<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<jsp:useBean id="now" class="java.util.Date" />
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML >
<html>
  <head>
    <base href="<%=basePath%>">
    <title>云净-透析单</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="云净,透析单,网页透析">
	<meta http-equiv="description" content="云净透析单">
	<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" type="text/css" href="${ctx}css/xgtl_wdbj.css" />
    <style>
     .input-sm{font-size: 14px !important;}
     .head_confirmed_name{color:#5cb85c;padding-right: 8px;}
     .modal-open .modal,.modal_container{
   	    overflow: auto;
      }
      .border-0{
      	border:0 !important;
      }
      tr.tx-zlxj-row1 td .control-label{
      	width:67px;
      }
      tr.tx-zlxj-row1 td,tr.txfs-tr-cc td{
      	width:16.6667%;
      }
      tr.tx-zlxj-row1 select.form-control{
      	min-width:108px;
      	max-width:120px;
      }
    </style>
  </head>
  <body>
	      <!-- 病人基本信息 -->
	       <input type="hidden" name="tx_status" value="${tx_status.tx_status}" />
           <form class="form-inline" id="patientinfo_from" >
	            <div class="div_content" style="height:auto;">
	                <div class="print_div"> <label for="" class="control-label">姓名:</label> <input type="text" class="form-control input_sm  print_input_sm" name="tx_hz_name" id="tx_hz_name"  value="${hzda.tx_name}" disabled="disabled"  /></div>
	                <div class="print_div" >
	                  <label for="" class="control-label">  性别:</label>
			          <div class="print_select_cover" > 
	                       <select class="form-control input_sm print_input" name="tx_hz_sex"  disabled="disabled">
			                <c:choose>
				                  <c:when test="${hzda.tx_sex=='M'}">
				                    <option value="M" selected="selected">男</option>
				                    <option value="F">女</option>
				                  </c:when>
				                  <c:when test="${hzda.tx_sex=='F'}">
				                    <option value="M" >男</option>
				                    <option value="F" selected="selected">女</option>
				                  </c:when>
				                </c:choose>
			               </select>	
			           </div>    
	                </div>
	                <div class="print_div"><label for="" class="control-label">年龄:</label> <input type="text" class="form-control input_sm print_input_sm" name="tx_age"  value="${hzda.tx_age}"   disabled="disabled" /></div> 
	                <div class="print_div"><label for="" class="control-label">透析号:</label> <input type="text" class="form-control input_sm print_input_sm" name="tx_number" id="tx_number" value="${hzda.tx_number}"  disabled="disabled"  /></div> 
	                <div class="print_div"><label for="" class="control-label">病区:</label> <input type="text" class="form-control input_sm print_input_sm" name="tx_bing_qu"  value="${hzda.tx_bing_qu}"   disabled="disabled" /></div> 
	                <div class="print_div"><label for="" class="control-label">床位:</label> <input type="text" class="form-control input_sm print_input_sm" name="tx_bed_number"  value="${hzda.tx_bed_number}" disabled="disabled"  /></div> 
	                <div class="print_div">
	                  <c:choose>
							  <c:when test="${hzda.tx_zyid==null||hzda.tx_zyid==''}">
							    <input type="checkbox" class="" name="tx_ismenzhen" checked="checked"  value="" disabled="disabled"   />
							    <label for="">门诊</label>
							  </c:when>
							  <c:when test="${hzda.tx_mzid==null||hzda.tx_mzid==''}">
							    <input type="checkbox" class="" name="tx_ismenzhen"   value="" disabled="disabled"  />
							    <label for="">门诊</label>
							  </c:when>
				      </c:choose>
	                </div> 
	                <div class="print_div"><label for="" class="control-label"> 住院号/门诊号:</label> <input type="text" class="form-control input_sm print_input_sm" id="tx_hzhospid" name="tx_hzhospid" value="${hzda.tx_zyid}${hzda.tx_mzid}" readonly="readonly" style="width: 100px;" <c:if test='${empty param.tx_no}'>onclick='updatehzhospid();'</c:if>  /></div> 
	                <div class="print_div"><label for="" class="control-label"> 透析次数:</label> <input type="text" class="form-control input_sm print_input_sm" name="tx_yiTouXiCiShu"  value="${hzda.tx_yiTouXiCiShu}"  disabled="disabled"  /></div> 
	                <div class="print_div"><label for="" class="control-label"> 诊断:</label> <input type="text" class="form-control input_sm print_input_sm" name="tx_zhen_duan"  value="${hzda.tx_zhen_duan}" disabled="disabled" style="width: 190px;" /></div> 
	                <div class="print_div"><label for="" class="control-label"> 入科方式:</label> <input type="text" class="form-control input_sm print_input_sm" id="tx_rkfs" name="" value="${tx_rkfs}" readonly="readonly" style="width: 100px;" onclick="gettxhzrkfs();" /></div> 
	                <div class="print_div"><label for="" class="control-label"> 首次透析时间:</label> <input type="text" class="form-control input_sm print_input_sm"   value="${hzda.tx_first_date}"  disabled="disabled" style="width: 105px;" /></div> 
	                <div class="print_div">
	                 <label for="" class="control-label">透析日期:</label> 
							  <div class="input-group date form_datetime_ymd_txform" style="display: inline-block;" >  
							   <input type="text"  class="form-control input_sm print_input_sm" name="tx_first_date"  onclick="getTxrq();" value="<c:if test='${tx_txdate==null}'><fmt:formatDate value="${now}" pattern='yyyy-MM-dd' /></c:if><c:if test='${tx_txdate!=null}'>${tx_txdate}</c:if>"  id="tx_first_date"  onchange="SearchhzinfoBytxrq(this);" readonly="readonly"  style="width: 105px;"  />
							   <span class="input-group-addon hidden-print" style="height:34px;"><span class="glyphicon glyphicon-calendar"  ></span></span>
							  </div>
	                </div>
	                <div class="print_div"> <button type="button" class="btn btn-info btn-base" id="print_default"  onclick="">打印</button> </div>
	                <c:if test='${empty param.tx_no}'>
	                  <div class="print_div"> <button type="button" class="btn btn-info btn-base" id=""  onclick="txfrombatchprint();">批量打印</button></div>
	                </c:if>
	                <div class="print_div"> <button type="button" class="btn btn-info hidden-print"   onclick="tx_print();" >模板设置</button></div>
	                <c:if test='${empty param.tx_no}'>
	                 <div class="tx_process_btn">
	                   <c:if test="${tx_status.tx_status<2|| empty tx_status.tx_status }"> <div class="print_div"> <button type="button" class="btn btn-info" style="background-color:#FF9C00;border-color:#FF9C00;" onclick="begintx();" >开始透析</button> </div></c:if>
	                   <c:if test="${tx_status.tx_status==2}"><div class="print_div"> <button type="button" class="btn btn-info" style="background-color:#ff3b30;border-color:#ff3b30;" onclick="endtx();" >结束透析</button> </div></c:if>
	                   <c:if test="${tx_status.tx_status==3}"><div class="print_div"> <button type="button" class="btn btn-info btn-base" id="txform_check_btn" style="background-color:#5BDD5E;border-color:#5BDD5E;" onclick="reporttx();" >自查</button> </div> </c:if>
	               	   <c:if test="${tx_status.tx_status>=4}"><div class="print_div"> <button type="button" class="btn btn-info btn-base" id="txform_check_confirm_btn" style="background-color:#AFB3B5;border-color:#AFB3B5;" disabled="disabled" >已自查</button> </div> </c:if>
	                   <c:if test="${tx_status.tx_status==4 && userinfo.USER_PERMISSION==0}"><div class="print_div"> <button type="button" id="txform_archving_btn" class="btn btn-info" style="background-color:#ff3b30;border-color:#ff3b30;" onclick="tx_archiving();" >审核归档</button> </div></c:if>
	                   <c:if test="${tx_status.tx_status==5}"><div class="print_div"> <button type="button" class="btn btn-info btn-base" style="background-color:#AFB3B5;border-color:#AFB3B5;width: auto;" disabled="disabled" >已审核归档</button> </div> </c:if>
	                 </div>
	                </c:if>
	            </div>
	         </form>  
	         
	         <div class="txform_info">
	          <!-- 透析处方 -->
	          <form class="form-horizontal" id="txcf_form">
	            <input type="hidden" class="tx_number" name="tx_number" value="${tx_number}" /> 
	            <input type="hidden" name="tx_time" value="${tx_txdate}" />
	            <input type="hidden" name="tx_zl_doctor" value="" /> 
	            <input type="hidden" name="tx_zl_doctor_id" value="" /> 
	            <table class="table tx_table" style="margin-bottom: 0px;">
	               <tr>
	                 <td align="center" rowspan="8"  class="tx_title_td"><div class="tx_title">透<br/>析<br/>处<br/>方 </div></td>
	               </tr>
	               <c:if test='${empty param.tx_no}'>
	                <tr>
	                 <td colspan="8" style="border-bottom: 1px solid #ddd;">
	                     <c:if test='${txcf.tx_status=="0"|| empty txcf.tx_status}'><span class="head_confirm_status">未确认</span></c:if>
	                     <c:if test='${txcf.tx_status=="1"}'><span class="head_confirmed_name">${txcf.tx_confirm_username}</span> <span class="head_confirmed">已确认</span></c:if>
		                 <button type="button"  class="btn btn-info btn-base save_hztcxf_txform">确认</button>
		                 <button type="button"  class="btn btn-info" onclick="printtxformsjd();" style="margin-left: 15px;">打印上机单</button>
	                 </td>
	                </tr>
	               </c:if>
	               
	               <tr>
	                <td><div class="tx_field_title">透析机:</div></td>
	                <td>		                
	                   <div class="tx_field">
						    <select class="input-sm form-control print_input" name="tx_txj_id" onchange="gettxj_jixing();" >
						     <c:if test="${txcf.tx_txj_id==null||txcf.tx_txj_id==''}"> <option value="">==请选择==</option> </c:if>
							 <c:forEach  items="${txj}" var="list" >
						      <c:choose>
						       <c:when test="${list.tx_txj_name==txcf.tx_txj_id}"> <option value="${list.tx_txj_name}" selected="selected" >${list.tx_txj_name}</option>  </c:when>
						        <c:otherwise> <option value="${list.tx_txj_name}" >${list.tx_txj_name}</option> </c:otherwise>
						      </c:choose>
						     </c:forEach>
						    </select>   
		                </div>
		            </td>
		            <td><div class="tx_field_title">机型:</div></td>
	                <td>
	                    <div class="tx_field"><input type="text" class="input-sm form-control print_input_m"  name="txcf_txjx"  value="${txcf_txjx}" readonly="readonly"  placeholder="请选择透析机" /> </div>
	                </td>
	                <td><div class="tx_field_title">目标脱水量(L):</div></td>
	                <td>
	                    <div class="tx_field"><input type="number" class="input-sm form-control print_input_m" readonly="readonly" name="tx_mubiao_ts" placeholder="参考值" value="<c:choose><c:when test="${txpgq.tx_tqtz=='-1'||txpgq.tx_tqtz==''||txpgq.tx_tqtz=='卧床'}"></c:when><c:otherwise>${txcf.tx_mubiao_ts}</c:otherwise></c:choose>" /></div>
	                </td>
	                <td><div class="tx_field_title"> 处方脱水量(L):</div></td>
	                <td>
	                   <div class="tx_field"><input type="number" class="input-sm form-control print_input_m"  name="tx_jcll" placeholder="医生设定" value="${txcf.tx_jcll}" oninput="clac_tx_clzl();" /></div>
	                </td>
	               </tr>
	               
	               <tr>
	                 <td><div class="tx_field_title">抗凝剂:</div></td>
		             <td>
		                 <div class="tx_field">
					        <select class="input-sm form-control print_input" name="tx_knj_id" id="tx_knj" >
					         <c:if test="${txcf.tx_knj_id==null||txcf.tx_knj_id==''}"> <option value="">==请选择==</option> </c:if>
							 <c:forEach  items="${knj}" var="list" >
						     <c:choose>
						      <c:when test="${list.tx_name==txcf.tx_knj_id}">  <option value="${list.tx_name}"  selected="selected" >${list.tx_name}</option> </c:when>
						      <c:otherwise> <option value="${list.tx_name}" >${list.tx_name}</option>  </c:otherwise>
						     </c:choose>
						     </c:forEach>
					        </select> 
		                 </div>
		             </td>
		             <td><div class="tx_field_title">首剂(mg):</div></td>
		             <td><div class="tx_field" id="knj_col1"> <input type="text" class="input-sm form-control print_input_m"  name="tx_sj" value="${txcf.tx_sj}" /></div></td>
		             <td><div class="tx_field_title">维持(mg/h):</div></td>
		             <td><div class="tx_field" id="knj_col2"> <input type="text" class="input-sm form-control print_input_m"  name="tx_weichi" value="${txcf.tx_weichi}" /></div></td>
		             <td><div class="tx_field_title">总量(mg):</div></td>
		             <td><div class="tx_field" id="knj_col3"> <input type="text" class="input-sm form-control print_input_m"  name="tx_zl" value="${txcf.tx_zl}" /></div></td>
	               </tr>
	               
	               <tr>
	                <td><div class="tx_field_title">透析方式:</div></td>
	                <td>
	                   <div class="tx_field">
					        <select class="input-sm form-control print_input" name="tx_txfs_id" id="tx_txfs_id" >
							  <c:forEach  items="${txfs}" var="list" >
							    <c:choose>
							     <c:when test="${list.tx_txfs_name==txcf.tx_txfs_id}"><option value="${list.tx_txfs_name}" selected="selected">${list.tx_txfs_name}</option></c:when>
							     <c:otherwise><option value="${list.tx_txfs_name}">${list.tx_txfs_name}</option> </c:otherwise>
							    </c:choose>
							  </c:forEach>
					        </select> 
				       </div>
	                </td>
	                <td><div class="tx_field_title" style="min-width: 82px;">透析时长(h):</div></td>
	                <td>
	                    <div class="tx_field"><input type="text" class="input-sm form-control print_input_m"  name="tx_zlsc" value="${txcf.tx_zlsc}"  oninput="calc_tx_zl();"  /> </div>
	                </td>
	                 <td><div class="tx_field_title">置换总量(L):</div></td>
	                 <td>
	                   <div class="tx_field" id="">
	                     <input type="text" class="input-sm form-control print_input_m"  name="tx_zhzl" value="${txcf.tx_zhzl}"   />
	                   </div>
	                 </td>
	                 
	                <td><div class="tx_field_title">置换方式:</div></td>
	                <td>
	                   <div class="tx_field" id="">
	                      <select class="input-sm form-control print_input" name="tx_zhfs" >
	                         <option value=""></option>
	                         <option value="前置换" <c:if test='${txcf.tx_zhfs=="前置换"}'>selected='selected'</c:if> >前置换</option>
	                         <option value="后置换" <c:if test='${txcf.tx_zhfs=="后置换"}'>selected='selected'</c:if> >后置换</option>
	                         <option value="中置换" <c:if test='${txcf.tx_zhfs=="中置换"}'>selected='selected'</c:if> >中置换</option>
	                         <option value="混合置换" <c:if test='${txcf.tx_zhfs=="混合置换"}'>selected='selected'</c:if> >混合置换</option>
	                      </select>
	                   </div>
	                </td>
	               </tr>
	               
	               <tr>
	                  <td><div class="tx_field_title">血透器:</div></td>
	                  <td>
	                   <div class="tx_field" id="">
	                    <select class="input-sm form-control print_input" name="tx_xtq_id"  >
					          <option value=""></option>
							  <c:forEach  items="${xtq}" var="list" >
							    <c:choose>
							      <c:when test="${list.inventory_name==txcf.tx_xtq_id}"><option value="${list.inventory_name}" selected="selected">${list.inventory_name}</option></c:when>
							      <c:otherwise><option value="${list.inventory_name}">${list.inventory_name}</option></c:otherwise>
							    </c:choose>
							  </c:forEach>
					     </select> 
	                   </div>
	                  </td> 
	                  
	                  <td><div class="tx_field_title">血滤器:</div></td>
	                  <td>
	                    <div class="tx_field" id="">
	                     <select class="input-sm form-control print_input" name="tx_xlq_id"  >
                          <option value=""></option> 
						  <c:forEach items="${xlq}" var="list" >
						    <c:choose>
						      <c:when test="${list.inventory_name==txcf.tx_xlq_id}"><option value="${list.inventory_name}" selected="selected">${list.inventory_name}</option></c:when>
						      <c:otherwise><option value="${list.inventory_name}">${list.inventory_name}</option></c:otherwise>
						    </c:choose>
						  </c:forEach>
						 </select>
	                    </div>
	                  </td> 
	                  
	                  <td><div class="tx_field_title">灌流器:</div></td>
	                  <td>
	                    <div class="tx_field" id="">
	                     <select class="input-sm form-control print_input" name="tx_glq_id"  >
	                      <option value=""></option>
						  <c:forEach  items="${glq}" var="list" >
						    <c:choose>
						      <c:when test="${list.inventory_name==txcf.tx_glq_id}"><option value="${list.inventory_name}" selected="selected">${list.inventory_name}</option></c:when>
						      <c:otherwise><option value="${list.inventory_name}">${list.inventory_name}</option></c:otherwise>
						    </c:choose>
						  </c:forEach>
						 </select>
	                    </div>
	                  </td> 
	                  <td colspan="2"></td>
	               </tr>
	               
	               <tr>
	                 <td><div class="tx_field_title" >血管通路:</div></td>
	                 <td>  
	                   <div class="tx_field">
					        <select class="input-sm form-control print_input" name="tx_xgtlbw_id" >
					          <option value=""></option>
							  <c:forEach  items="${xgtlbw}" var="list" >
                                <c:choose>
							     <c:when test="${list.tx_bw_name==txcf.tx_xgtlbw_id}"><option value="${list.tx_bw_name}" selected="selected">${list.tx_bw_name}</option> </c:when>
							     <c:otherwise> <option value="${list.tx_bw_name}" >${list.tx_bw_name}</option></c:otherwise>
							    </c:choose>							    
							  </c:forEach>
					        </select>
		                </div>
		             </td>
	                 <td colspan="2">
	                    <div class="tx_field">
					        <select class="input-sm form-control print_input " name="tx_xgtl_id" >
					           <option value=""></option> 
							   <c:forEach  items="${xgtl}" var="list" >
							    <c:choose>
							    <c:when test="${list.tx_xgtl_style_name==txcf.tx_xgtl_id}"><option value="${list.tx_xgtl_style_name}" selected="selected">${list.tx_xgtl_style_name}</option> </c:when>
							    <c:otherwise> <option value="${list.tx_xgtl_style_name}" >${list.tx_xgtl_style_name}</option></c:otherwise>
							    </c:choose>
							  </c:forEach>
					        </select>
		                 </div>
	                 </td>
	                 <td><div class="tx_field_title" style="min-width: 120px;">血流量(ml/min):</div></td>
	                 <td><div class="tx_field"> <input type="text" class="input-sm form-control print_input_m"  name="tx_xll" value="${txcf.tx_xll}"  /></div></td>
	                 <td><div class="tx_field_title" > 透析液流量(ml/min):</div></td>
	                 <td><div class="tx_field"> <input type="text" class="input-sm form-control print_input_m"  name="tx_txyll" value="${txcf.tx_txyll}" /></div></td>
	               </tr>
	               
	               <tr>
	                <td><div class="tx_field_title" style="min-width: 100px;">钾(mmol/L):</div></td>
	                <td><div class="tx_field "> <input type="text" class="input-sm form-control print_input_m"  name="tx_txycf_jia" value="${txcf.tx_txycf_jia}" /></div></td>
	                <td><div class="tx_field_title" style="min-width:145px;">钠(mmol/L):</div></td>
	                <td><div class="tx_field "> <input type="text" class="input-sm form-control print_input_m"  name="tx_txycf_na" value="${txcf.tx_txycf_na}"  /></div></td>
	                <td><div class="tx_field_title" >钙(mmol/L):</div></td>
	                <td><div class="tx_field "> <input type="text" class="input-sm form-control print_input_m"  name="tx_txycf_gai" value="${txcf.tx_txycf_gai}" />  </div></td>
	                <td><div class="tx_field_title" style="min-width: 140px;">碳酸氢根(mmol/L):</div></td>
	                <td><div class="tx_field "> <input type="text" class="input-sm form-control print_input_m"  name="tx_txycf_tsqg" value="${txcf.tx_txycf_tsqg}" /> </div></td>
	               </tr>
	             </table>
			     </form>
			       
			     <!-- 透前评估 -->
			     <form class="form-horizontal" id="txq_pg_form">
			       <input type="hidden" class="tx_number" name="tx_number" value="${tx_number}" />
			       <input type="hidden" name="tx_time" value="${tx_txdate}" />
			       <input type="hidden" id="txpgqzt" value="${txpgq.tx_status}" />
			       <table class="table tx_table " style="margin-bottom: 0px;">
		               <tr>
		                 <td align="center" rowspan="8"  class="tx_title_td"><div class="tx_title">透<br/>前<br/>评<br/>估</div></td>
		               </tr>
		               <c:if test='${empty param.tx_no}'>
		                <tr>
		                 <td colspan="8" style="border-bottom: 1px solid #ddd;">
		                     <c:if test='${txpgq.tx_status=="0"|| empty txpgq.tx_status}'><span class="head_confirm_status">未确认</span></c:if>
		                     <c:if test='${txpgq.tx_status=="1"}'><span class="head_confirmed_name">${txpgq.tx_confirm_username}</span> <span class="head_confirmed">已确认</span></c:if>
			                 <button type="button"  class="btn btn-info btn-base mtxform_hztqpg_save">确认</button>
		                 </td>
		                </tr>
		               </c:if>
		               <tr>
		                  <td><div class="tx_field_title" >T(℃):</div></td>
		                  <td><div class="tx_field "> <input type="text" class="input-sm form-control print_input_m" id="tx_pg_tq"  name="tx_pg_t" value="${txpgq.tx_pg_t}" /></div></td>
		                  <td><div class="tx_field_title" >P(次/分):</div></td>
		                  <td><div class="tx_field "> <input type="text" class="input-sm form-control print_input_m"  id="tx_pg_pq" name="tx_pg_p" value="${txpgq.tx_pg_p}" /></div></td>
		                  <td><div class="tx_field_title" >R(次/分):</div></td>
		                  <td><div class="tx_field "> <input type="text" class="input-sm form-control print_input_m"  id="tx_pg_hrq" name="tx_pg_hr" value="${txpgq.tx_pg_hr}" /></div></td>
		                  <td><div class="tx_field_title" >BP(mmhg):</div></td>
		                  <td>
		                    <div class="tx_field " >
		                     <input type="text" <c:if test="${txpgq.tx_pg_BP_type==2||txpgq.tx_pg_BP_type==3||txpgq.tx_pg_BP_type==4}">readonly="readonly"</c:if> style="display: inline-block;width: 80px;" class="input-sm form-control print_input_m"  id="tx_pg_bpq1" name="tx_pg_BP_shousuo" value="${txpgq.tx_pg_BP_shousuo}"  /><b>/</b>
		                     <input type="text" <c:if test="${txpgq.tx_pg_BP_type==2||txpgq.tx_pg_BP_type==3||txpgq.tx_pg_BP_type==4}">readonly="readonly"</c:if> style="display: inline-block;width: 80px;" class="input-sm form-control print_input_m" id="tx_pg_bpq2" name="tx_pg_BP_shuzhang" value="${txpgq.tx_pg_BP_shuzhang}" />
		                     <select class="input-sm form-control print_input" name="tx_pg_BP_type" style="display: inline-block;width: 80px;" id="txq_xz" onchange="choosebptype(this,'txq');">
		                        <option value="0">上肢</option>
		                        <option value="1" <c:if test="${txpgq.tx_pg_BP_type==1}">selected="selected"</c:if> >下肢</option>
    		                    <option value="2" <c:if test="${txpgq.tx_pg_BP_type==2}">selected="selected"</c:if> >拒测</option>
    		                    <option value="3" <c:if test="${txpgq.tx_pg_BP_type==3}">selected="selected"</c:if> >测不出</option>
    		                    <option value="4" <c:if test="${txpgq.tx_pg_BP_type==4}">selected="selected"</c:if> >/</option>
		                     </select> 
		                    </div>
		                  </td>
		               </tr>
		               
		               <tr>
		                 <td><div class="tx_field_title" >干体重(kg):</div></td>
		                 <td>
		                   <div class="tx_field ">
		                    <input type="text" class="input-sm form-control print_input_m"  name="tx_gtz" id="tx_gtz" oninput="calc_mbtsl();" value="${txpgq.tx_gtz}"  />
		                   </div>
		                 </td> 
		                 
		                 <td><div class="tx_field_title" style="min-width: 125px;">上次透后体重(kg):</div></td>
		                 <td>
		                   <div class="tx_field ">
		                     <input type="text" class="input-sm form-control print_input_m"  name="tx_qctxhtz" readonly="readonly" value="<c:choose><c:when test="${txpgq.tx_status=='1'}">${txpgq.tx_qctxhtz}</c:when><c:otherwise>${txpgq.tx_last_qctxhtz}</c:otherwise></c:choose>" id="tx_last_weigth"  oninput="calc_tx_tzzj();" />
		                   </div>
		                 </td> 
		                 
		                 <td><div class="tx_field_title" >称重方式:</div></td>
		                 <td>
		                   <div class="tx_field ">
		                     <select id="txq_czfs" class="input-sm form-control hidden-print" onchange="tq_czfsChange(this);" >
		                         <option value="正常">正常</option>
		                         <option value="卧床" <c:if test="${txpgq.tx_tqtz=='-1'||txpgq.tx_tqtz=='卧床'}">selected="selected"</c:if>>卧床</option> 
		                         <option value="拒测" <c:if test="${txpgq.tx_tqtz=='拒测'}">selected="selected"</c:if>>拒测</option>
		                     </select>   
		                   </div>
		                 </td> 
		                 
		                 <td><div class="tx_field_title" style="min-width: 100px;">透前体重(kg):</div></td>
		                 <td>
		                   <div class="tx_field ">
		                     <input type="text" class="input-sm form-control print_input_m"  name="tx_tqtz" oninput="calc_mbtsl();calc_tx_tzzj();" value="<c:choose><c:when test="${txpgq.tx_tqtz=='-1'}">卧床</c:when><c:otherwise>${txpgq.tx_tqtz}</c:otherwise></c:choose>" id="tx_tqtz"  />
		                   </div>
		                 </td> 
		               </tr>
		               
		               <tr>
		                 <td><div class="tx_field_title" style="min-width: 100px;">体重增加(kg):</div></td>
		                 <td>
		                   <div class="tx_field ">
		                     <input type="text" class="input-sm form-control print_input_m"  name="tx_tzzj" readonly="readonly" value="<c:choose><c:when test="${txpgq.tx_tqtz=='卧床'}">不详</c:when> <c:when test="${txpgq.tx_tqtz=='-1'||txpgq.tx_qctxhtz=='/'||empty txpgq.tx_qctxhtz}">/</c:when><c:otherwise>${txpgq.tx_tzzj}</c:otherwise></c:choose>" id="tx_weight_add"  />
		                   </div>
		                 </td>
		                 
		                 <td><div class="tx_field_title" >预增脱水量(L):</div></td>
		                 <td>
		                   <div class="tx_field ">
		                      <input type="number" class="input-sm form-control print_input_m"  name="tx_yztsl" id="tx_yztsl" value="${txpgq.tx_yztsl}" oninput="clac_tx_clzl();"  />
		                   </div>
		                 </td>
		                 
		                 <td><div class="tx_field_title" style="min-width: 100px;">超滤总量(L):</div></td>
		                 <td>
		                   <div class="tx_field ">
		                       <input type="text" class="input-sm form-control print_input_m"  name="tx_clzl" id="tx_clzl" value="${txpgq.tx_clzl}" readonly="readonly" />
		                   </div>
		                 </td>
		                 
		                 <td><div class="tx_field_title" ></div></td>
		                 <td>
		                   <div class="tx_field ">
		                   </div>
		                 </td>
		               </tr>
		               
		               <tr>
		                 <td><div class="tx_field_title" >透析间期:</div></td>
		                 <td>
		                   <div class="tx_field ">
		                     <input type="text" class="input-sm form-control print_input_m" id="txqj_name" name="txqj_name" value="${txpgq.txqj_name}" readonly="readonly" onclick="FCheckBox('txqj',this);" />
				             <input type="hidden" class="input-sm form-control print_input_m" id="txqj_id" name="txqj_id" value="${txpgq.txqj_id}" readonly="readonly"  />
		                   </div>
		                 </td>
		                 
		                 <td><div class="tx_field_title" >前次透析后:</div></td>
		                 <td>
		                   <div class="tx_field ">
		                      <input type="text" class="input-sm form-control print_input_m" id="qctxh_name" name="qctxh_name" value="<c:choose><c:when test="${txpgq.tx_status=='1'}">${txpgq.qctxh_name}</c:when><c:otherwise>${txpgq.tx_last_qctxh_name}</c:otherwise></c:choose>" readonly="readonly" onclick="FCheckBox('qctxh',this);" />
				              <input type="hidden" class="input-sm form-control print_input_m" id="qctxh_id" name="qctxh_id" value="${txpgq.qctxh_id}" readonly="readonly"  />
		                   </div>
		                 </td>
		                 
		                 <td><div class="tx_field_title" >透前症状:</div></td>
		                 <td >
		                   <div class="tx_field ">
		                     <input type="text" class="input-sm form-control print_input_m" id="tqzz_name"  name="tqzz_name" value="${txpgq.tqzz_name}"  readonly="readonly"  onclick="FCheckBox('tqzz',this);" />
				             <input type="hidden" class="input-sm form-control print_input_m" id="tqzz_id"  name="tqzz_id" value="${txpgq.tqzz_id}"  readonly="readonly"  />
		                   </div>
		                 </td>
		                 <td></td><td></td>
		               </tr>
		               
		               <tr>
		                 <td><div class="tx_field_title" >内瘘:</div></td>
		                 <td>
		                   <div class="tx_field ">
		                     <input type="text" class="input-sm form-control print_input_m" id="nl_name" name="nl_name" value="${txpgq.nl_name}" readonly="readonly" onclick="FCheckBox('nl',this);"  />
				             <input type="hidden" class="input-sm form-control" id="nl_id" name="nl_id" value="${txpgq.nl_id}" readonly="readonly"  />
		                   </div>
		                 </td>  
		                 
		                 <td><div class="tx_field_title" >导管:</div></td>
		                 <td>
		                   <div class="tx_field ">
		                      <input type="text" class="input-sm form-control print_input_m" id="dg_name" name="dg_name" value="${txpgq.dg_name}" readonly="readonly"  onclick="FCheckBox('dg',this);"  />
				              <input type="hidden" class="input-sm form-control print_input_m" id="dg_id" name="dg_id" value="${txpgq.dg_id}" readonly="readonly"  />
		                   </div>
		                 </td> 
		                 
		                 <td><div class="tx_field_title" >合并症:</div></td>
		                 <td>
		                   <div class="tx_field ">
		                     <input type="text" class="input-sm form-control print_input_m" id="hbz_name" name="hbz_name" value="${txpgq.hbz_name}"  readonly="readonly" onclick="FCheckBox('hbz',this);" />
				             <input type="hidden" class="input-sm form-control print_input_m" id="hbz_id" name="hbz_id" value="${txpgq.hbz_id}"  readonly="readonly" />
		                   </div>
		                 </td> 
		                 <td></td><td></td>
		               </tr>
	               </table>
			     </form> 
			       
			       
			    <!-- 临时医嘱 -->
			   <form class="form-inline" id="tx_lsyz_form">
			     <table class="table tx_table table-bordered">
			       <tr><td rowspan="3" align="center" class="tx_title_td"><div class="tx_title">临<br>时<br>医<br>嘱</div></td></tr>
			       
			       <c:if test='${empty param.tx_no}'>
			       <tr>
			        <td style="border-bottom: 1px solid #ddd;" id="tx_yzprocess_btn">
		             <!--  <span class="head_confirm_status">未确认</span>
		              <button type="button"  class="btn btn-info btn-base" onclick="">确认</button> -->
		                <button type="button"  class="btn btn-success btn-base btn-left addhzyz-btn" onclick="addhzyz();">添加医嘱</button>
		                <button type="button"  class="btn btn-success btn-base btn-left addtemyz-btn" onclick="addtemyz();">医嘱模板</button>
		                <button type="button"  class="btn btn-primary btn-base btn-left exehzyz-btn" onclick="exehzyz();">执行医嘱</button>
		                <button type="button"  class="btn btn-danger btn-base btn-left delhzyz-btn" onclick="delhzyz();" >删除</button>
			        </td>
			       </tr>
			       </c:if>
			       
			       <tr> 
			        <td style="padding: 15px;">
			         <div class="dix_table_div">
				     <table class="table table-condensed-sm table-bordered tx_table fix_table" >  
					    <colgroup>
					      <col style="width:120px;" />
					      <col style="width:120px;" />
					      <col />
					      <col style="width:120px;" />
					      <col style="width:120px;" />
					      <col style="width:120px;" />
					    </colgroup>  
					    <thead>  
					      <tr class="th_thead" style="height: 45px;">
					        <th style="text-align: center;vertical-align: middle;" >开嘱医生</th>
					        <th style="text-align: center;vertical-align: middle;">开始时间</th>
					        <th style="text-align: center;vertical-align: middle;">医嘱内容</th>
					        <th style="text-align: center;vertical-align: middle;">执行时间</th>
					        <th style="text-align: center;vertical-align: middle;">执行护士</th>
					        <th style="text-align: center;vertical-align: middle;">核对护士</th>
					      </tr>
					    </thead>  
					  </table>
					  </div>
			          <div style="height:172px;overflow-y: scroll;">
			          <table class="table table-condensed-sm  table-bordered tx_table" id="tx_lsyz_table">
			            <colgroup>
			              <col style="width:120px;" />
					      <col style="width:120px;" />
					      <col />
					      <col style="width:120px;" />
					      <col style="width:120px;" />
					      <col style="width:120px;" />
			            </colgroup>  
				        <tbody id="tx_lsyz_table_thbody">
			                 <tr>
			                  <td><div class="tx_common_field"></div></td>
				              <td><div class="tx_common_field">&nbsp;</div></td> 
				              <td><div class="tx_common_field"></div></td> 
				              <td><div class="tx_common_field"></div></td>
				              <td><div class="tx_common_field"></div></td> 
				              <td><div class="tx_common_field"></div></td> 
					        </tr>
                            <tr>
			                  <td><div class="tx_common_field"></div></td>
				              <td><div class="tx_common_field">&nbsp;</div></td> 
				              <td><div class="tx_common_field"></div></td> 
				              <td><div class="tx_common_field"></div></td>
				              <td><div class="tx_common_field"></div></td> 
				              <td><div class="tx_common_field"></div></td> 
					        </tr>
					        <tr>
			                  <td><div class="tx_common_field"></div></td>
				              <td><div class="tx_common_field">&nbsp;</div></td> 
				              <td><div class="tx_common_field"></div></td> 
				              <td><div class="tx_common_field"></div></td>
				              <td><div class="tx_common_field"></div></td> 
				              <td><div class="tx_common_field"></div></td> 
					        </tr>
					        <tr>
			                  <td><div class="tx_common_field"></div></td>
				              <td><div class="tx_common_field">&nbsp;</div></td> 
				              <td><div class="tx_common_field"></div></td> 
				              <td><div class="tx_common_field"></div></td>
				              <td><div class="tx_common_field"></div></td> 
				              <td><div class="tx_common_field"></div></td> 
					        </tr>
					        <tr>
			                  <td><div class="tx_common_field"></div></td>
				              <td><div class="tx_common_field">&nbsp;</div></td> 
				              <td><div class="tx_common_field"></div></td> 
				              <td><div class="tx_common_field"></div></td>
				              <td><div class="tx_common_field"></div></td> 
				              <td><div class="tx_common_field"></div></td> 
					        </tr> 
				        </tbody> 
				     </table>
				     </div>
			        </td>
			        </tr>
			     </table>
			    </form>    
			       
			    <!-- 双人核对 -->
			    <form class="form-horizontal" id="tx_doublecheck_form">
			       <input type="hidden" class="tx_number" name="tx_number" value="${tx_number}" />
			       <input type="hidden" name="tx_time" value="${tx_txdate}" />
			       <input type="hidden" name="tx_date" value="${tx_txdate}" />
			       <input name="tx_zlxj_id" type="hidden" value="${txzlxj.tx_zlxj_id}" />
			       <input name="tx_hd_nurse_id" type="hidden" value="${txzlxj.tx_hd_nurse_id}" />
			       <table class="table tx_table " style="margin-bottom: 0px;">
		               <tr>
		                 <td align="center" rowspan="8"  class="tx_title_td"><div class="tx_title">双<br/>人<br/>核<br/>对</div></td>
		               </tr>
		               <c:if test='${empty param.tx_no}'> 
		                <tr>
		                 <td colspan="8" style="border-bottom: 1px solid #ddd;">
		                     <c:if test='${dbcheck.tx_status=="0"|| empty dbcheck.tx_status}'><span class="head_confirm_status">未确认</span></c:if>
		                     <c:if test='${dbcheck.tx_status=="1"}'><span class="head_confirmed_name">${dbcheck.tx_confirm_username}</span> <span class="head_confirmed">已确认</span></c:if>
			                 <button type="button"  class="btn btn-info btn-base save_double_check_txform">确认</button>
		                 </td>
		                </tr>
		               </c:if>
		               
		               <tr>
		                  <td width="120px"><div class="tx_field_title" style="max-width:100px;">透析物品核查:</div></td>
		                  <td width="60px" style="padding: 8px 0px;"><div class="tx_field_title" >正确</div></td>
		                  <td width="25px" align="left"><input type="radio" name="tx_touXiWuPin_indicator" value="正确" class="template_checkbox" /></td>
		                  <td width="60px" style="padding: 8px 0px;"><div class="tx_field_title" >&nbsp;&nbsp;整改</div></td>
		                  <td width="25px" align="left"><input type="radio" name="tx_touXiWuPin_indicator" value="整改" class="template_checkbox" /></td>
		                  <td width="80px"><div class="tx_field_title" >差错：</div></td>
		                  <td><div class="tx_field "> <input type="text" class="input-sm form-control print_input_m"  name="tx_touXiWuPin_error" value="${dbcheck.tx_touXiWuPin_error}" /></div></td>
		               </tr>
		               
		               <tr>
		                  <td width="120px"><div class="tx_field_title" style="max-width:100px;">透析参数核查:</div></td>
		                  <td width="60px" style="padding: 8px 0px;"><div class="tx_field_title" >正确</div></td>
		                  <td width="25px" align="left"><input type="radio" name="tx_touXiCanShu_indicator" value="正确" class="template_checkbox" /></td>
		                  <td width="60px" style="padding: 8px 0px;"><div class="tx_field_title" >&nbsp;&nbsp;整改</div></td>
		                  <td width="25px" align="left"><input type="radio" name="tx_touXiCanShu_indicator" value="整改" class="template_checkbox" /></td>
		                  <td width="80px"><div class="tx_field_title" >差错：</div></td>
		                  <td><div class="tx_field "> <input type="text" class="input-sm form-control print_input_m"  name="tx_touXiCanShu_error" value="${dbcheck.tx_touXiCanShu_error}" /></div></td>
		               </tr>
		               
		               <tr>
		                  <td width="120px"><div class="tx_field_title" style="max-width:100px;">血管通路核查:</div></td>
		                  <td width="60px" style="padding: 8px 0px;"><div class="tx_field_title" >正确</div></td>
		                  <td width="25px" align="left"><input type="radio" name="tx_xueGuanTongLu_indicator" value="正确" class="template_checkbox" /></td>
		                  <td width="60px" style="padding: 8px 0px;"><div class="tx_field_title" >&nbsp;&nbsp;整改</div></td>
		                  <td width="25px" align="left"><input type="radio" name="tx_xueGuanTongLu_indicator" value="整改" class="template_checkbox" /></td>
		                  <td width="80px"><div class="tx_field_title" >差错：</div></td>
		                  <td><div class="tx_field "> <input type="text" class="input-sm form-control print_input_m"  name="tx_xueGuanTongLu_error" value="${dbcheck.tx_xueGuanTongLu_error}" /></div></td>
		               </tr>
		               
		               <tr>
		                  <td width="120px"><div class="tx_field_title" style="max-width:100px;">管道连接核查:</div></td>
		                  <td width="60px" style="padding: 8px 0px;"><div class="tx_field_title" >正确</div></td>
		                  <td width="25px" align="left"><input type="radio" name="tx_guanDao_indicator" value="正确" class="template_checkbox" /></td>
		                  <td width="60px" style="padding: 8px 0px;"><div class="tx_field_title" >&nbsp;&nbsp;整改</div></td>
		                  <td width="25px" align="left"><input type="radio" name="tx_guanDao_indicator" value="整改" class="template_checkbox" /></td>
		                  <td width="80px"><div class="tx_field_title" >差错：</div></td>
		                  <td><div class="tx_field "> <input type="text" class="input-sm form-control print_input_m"  name="tx_guanDao_error" value="${dbcheck.tx_guanDao_error}" /></div></td>
		               </tr>
		               <tr>
		                  <td><div class="tx_field_title" >核对护士:</div></td>
		                  <td colspan="4">
		                  <div class="tx_field ">
		                   <select class="input-sm form-control" name="tx_hd_nurse"  id="tx_double_tx_hd_nurse">
					          <option value=""></option>
					          <c:forEach  items="${userlist}" var="user" >
					             <c:if test="${user.USER_PERMISSION==3||user.USER_PERMISSION==4}">
					               <c:choose>
					                 <c:when test="${user.USER_NAME==txzlxj.tx_hd_nurse}"> <option data-id="${user.USER_ID}" value="${user.USER_NAME}" selected="selected">${user.USER_NAME}</option></c:when>
					                  <c:otherwise> <option data-id="${user.USER_ID}" value="${user.USER_NAME}" >${user.USER_NAME}</option></c:otherwise>
					                </c:choose>
					             </c:if>
							  </c:forEach>
					         </select>
		                  </div>
		                  </td>
		               </tr>
		          </table>
		        </form>      
			       
			  <!-- 监测记录 --> 
			   <form class="" id="tx_jcjl_form">
			    <input type="hidden" class="tx_number" name="tx_number" value="${tx_number}" />
			    <input type="hidden" name="tx_time" value="${tx_txdate}" />
			    <table class="table tx_table table-bordered" >
			       <tr><td rowspan="3" align="center" class="tx_title_td"><div class="tx_title">监<br>测<br>记<br>录</div></td></tr>
			       <c:if test='${empty param.tx_no}'>
			        <tr>
			         <td style="border-bottom: 1px solid #ddd;">
			              <span class="head_confirmed_name">${tx_confirm_username}</span>
			              <span class="head_confirm_status">未确认</span>
			              <button type="button"  class="btn btn-info btn-base tx_jcjlconfirm_btn" onclick="txjcjlconfirm();">确认</button>
			              <button type="button"  class="btn btn-success btn-base btn-left tx_jcjladd_btn" onclick="addhzjcjl();">添加监测</button>
			              <button type="button"  class="btn btn-danger btn-base btn-left tx_jcjldel_btn" onclick="delhzjcjl();">删除</button>
			         </td>
			        </tr>
			       </c:if>
			       <tr> 
			        <td style="padding: 15px;overflow-x: scroll;">
			         <div class="dix_table_div">
				      <table class="table table-condensed-sm table-bordered tx_table fix_table" >  
					    <colgroup>
					      <col style="width: 65px;" />
					      <col style="width: 60px;" />
					      <col style="width: 60px;" />
					      <col style="width: 60px;" span="2"/>
					      <col style="width: 70px;" />
					      <col style="width: 65px;" span="2" />
					      <col style="width: 65px;" span="2" />
					      <col style="width: 80px;" span="2" />
					      <col style="width: 65px;" span="2" />
					      <col  />
					      <col/>
					      <col/>
					    </colgroup>  
					    <thead >  
					      <tr class="th_thead">
					      <th  style="text-align:center;vertical-align: middle;">时间</th>
					      <th style="text-align: center;vertical-align: middle;">脉搏<br>(次/分)</th>
					      <th style="text-align: center;vertical-align: middle;">呼吸<br>(次/分)</th>
					      <th colspan="2" style="text-align: center;vertical-align: middle;">血压<br>(mmHg)</th>
					      
					      <th  align="center" style="text-align: center;vertical-align: middle;">血流量<br>(ml/min)</th>
					      <th  style="text-align: center;vertical-align: middle;">静脉压<br>(mmhg)</th>
					      <th  style="text-align: center;vertical-align: middle;">跨膜压<br>(mmhg)</th>
					      <th  style="text-align: center;vertical-align: middle;">超滤率<br>(ml/h)</th>
					      <th  style="text-align: center;vertical-align: middle;">超滤量<br>(ml)</th>
					      <th  style="text-align: center;vertical-align: middle;" >钠浓度<br>(mmol/L)</th>
					      <th  style="text-align: center;vertical-align: middle;" >透析液温度<br>(℃)</th>
					      <th  style="text-align: center;vertical-align: middle;">置换率<br>(ml/min)</th>
					      <th  style="text-align: center;vertical-align: middle;">置换量<br>(L)</th>
					      
					      <th style="text-align: center;vertical-align: middle;">症状</th>
					      <th style="text-align: center;vertical-align: middle;">处理</th>
					      <th style="text-align: center;vertical-align: middle;">结果</th>
					      </tr>
					    </thead>  
					  </table>
					  </div>
			          <div style="height:172px;overflow-y: scroll;">
			          <table class="table table-condensed-sm table-bordered tx_table fix_table" id="tx_jcjl_table" >
			                <colgroup>
	                          <col style="width: 65px;" />
	                          <col style="width: 60px;" />
						      <col style="width: 60px;" />
						      <col style="width: 60px;" span="2"/>
						      <col style="width: 70px;" />
						      <col style="width: 65px;" span="2" />
						      <col style="width: 65px;" span="2" />
						      <col style="width: 80px;" span="2" />
						      <col style="width: 65px;" span="2" />
						      <col/>
						      <col/>
						      <col/>
			                </colgroup>  
				            <tbody id="tx_jcjl_table_thbody">
				              <tr>
				                  <td><div class="tx_common_field"></div></td>
					              <td><div class="tx_common_field">&nbsp;</div></td> 
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td>
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td>
					              <td><div class="tx_common_field"></div></td>
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td>
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td> 
		                          <td><div class="tx_common_field"></div></td> 
		                          <td><div class="tx_common_field"></div></td>
				              </tr>
				              <tr>
				                  <td><div class="tx_common_field"></div></td>
					              <td><div class="tx_common_field">&nbsp;</div></td> 
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td>
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td>
					              <td><div class="tx_common_field"></div></td>
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td>
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td> 
		                          <td><div class="tx_common_field"></div></td> 
		                          <td><div class="tx_common_field"></div></td>
				              </tr>
				              <tr>
				                  <td><div class="tx_common_field"></div></td>
					              <td><div class="tx_common_field">&nbsp;</div></td> 
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td>
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td>
					              <td><div class="tx_common_field"></div></td>
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td>
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td> 
		                          <td><div class="tx_common_field"></div></td> 
		                          <td><div class="tx_common_field"></div></td>
				              </tr>
				              <tr>
				                  <td><div class="tx_common_field"></div></td>
					              <td><div class="tx_common_field">&nbsp;</div></td> 
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td>
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td>
					              <td><div class="tx_common_field"></div></td>
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td>
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td> 
		                          <td><div class="tx_common_field"></div></td> 
		                          <td><div class="tx_common_field"></div></td>
				              </tr>
				              
				                 <tr>
				                  <td><div class="tx_common_field"></div></td>
					              <td><div class="tx_common_field">&nbsp;</div></td> 
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td>
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td>
					              <td><div class="tx_common_field"></div></td>
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td>
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td> 
					              <td><div class="tx_common_field"></div></td> 
		                          <td><div class="tx_common_field"></div></td> 
		                          <td><div class="tx_common_field"></div></td>
				              </tr>
				           </tbody>
				      </table>
				      </div>
			        </td>
			       </tr>
			       
			    </table>
			   </form> 
			       
	          
	            <!-- 透析后评估 --> 
			    <form class="form-horizontal" id="txh_pg_form">
			      <input type="hidden" class="tx_number" name="tx_number" value="${tx_number}" /> 
			      <input type="hidden" id="txpghzt" value="${txpgh.tx_status}" />
			      <input type="hidden" name="tx_time"  value="${tx_txdate}" />
			      <table class="table tx_table " style="margin-bottom: 0px;">
		               <tr>
		                 <td align="center" rowspan="8"  class="tx_title_td"><div class="tx_title">透<br/>后<br/>评<br/>估</div></td>
		               </tr>
		               
		               <c:if test='${empty param.tx_no}'>
		                <tr>
		                 <td colspan="8" style="border-bottom: 1px solid #ddd;">
			                     <c:if test='${txpgh.tx_status=="0"|| empty txpgh.tx_status}'><span class="head_confirm_status">未确认</span></c:if>
			                     <c:if test='${txpgh.tx_status=="1"}'><span class="head_confirmed_name">${txpgh.tx_confirm_username}</span> <span class="head_confirmed">已确认</span></c:if>
				                 <button type="button"  class="btn btn-info btn-base save_txform_thpg" onclick="confirmthpg();">确认</button>
		                 </td>
		                </tr>
		               </c:if>
		               
		               <tr>
		                  <td><div class="tx_field_title" >T(℃):</div></td>
		                  <td><div class="tx_field "><input type="text"  class="input-sm form-control input-sm print_input_m"  name="tx_pg_t" id="txh_T" value="${txpgh.tx_pg_t}"   /></div></td>
		                  
		                  <td><div class="tx_field_title" >P(次/分):</div></td>
		                  <td><div class="tx_field "><input type="text" class="input-sm form-control print_input_m"  name="tx_pg_p" id="txh_P" value="${txpgh.tx_pg_p}"  /></div></td>
		                  
		                  <td><div class="tx_field_title" >R(次/分):</div></td>
		                  <td><div class="tx_field "><input type="text" class="input-sm form-control print_input_m"  name="tx_pg_hr" id="txh_R" value="${txpgh.tx_pg_hr}" /></div></td>
		                  
		                  <td><div class="tx_field_title" >BP(mmhg):</div></td>
		                  <td>
		                   <div class="tx_field " style="min-width: 210px;">
		                     <%-- <input type="text"  style="width: 80px;display: inline-block;" class="input-sm form-control print_input_m"  name="tx_pg_BP_shousuo" id="tx_pg_BP_shousuo" value="${txpgh.tx_pg_BP_shousuo}"  placeholder="" /><b>/</b>
		                     <input type="text" style="width: 80px;display: inline-block;" class="input-sm form-control print_input_m"  name="tx_pg_BP_shuzhang" id="tx_pg_BP_shuzhang" value="${txpgh.tx_pg_BP_shuzhang}"  placeholder="" /> 
                              --%> 
                             <input type="text" <c:if test="${txpgh.tx_pg_BP_type==2||txpgh.tx_pg_BP_type==3||txpgh.tx_pg_BP_type==4}">readonly="readonly"</c:if> style="display: inline-block;width: 80px;" class="input-sm form-control print_input_m" id="txh_bp1" name="tx_pg_BP_shousuo" value="${txpgh.tx_pg_BP_shousuo}"  /><b>/</b>
		                     <input type="text" <c:if test="${txpgh.tx_pg_BP_type==2||txpgh.tx_pg_BP_type==3||txpgh.tx_pg_BP_type==4}">readonly="readonly"</c:if> style="display: inline-block;width: 80px;" class="input-sm form-control print_input_m" id="txh_bp2" name="tx_pg_BP_shuzhang" value="${txpgh.tx_pg_BP_shuzhang}" />
		                     <select class="input-sm form-control print_input" name="tx_pg_BP_type" style="display: inline-block;width: 80px;" id="txh_xz" onchange="choosebptype(this,'txh');">
		                        <option value="0">上肢</option>
		                        <option value="1" <c:if test="${txpgh.tx_pg_BP_type==1}">selected="selected"</c:if> >下肢</option>
    		                    <option value="2" <c:if test="${txpgh.tx_pg_BP_type==2}">selected="selected"</c:if> >拒测</option>
    		                    <option value="3" <c:if test="${txpgh.tx_pg_BP_type==3}">selected="selected"</c:if> >测不出</option>
    		                    <option value="4" <c:if test="${txpgh.tx_pg_BP_type==4}">selected="selected"</c:if> >/</option>
		                     </select>
		                  </div>
		                  </td>
		                  
			           </tr>
			           
			             <tr>
		                  <td><div class="tx_field_title" style="min-width: 110px;">实际超滤量(ml):</div></td>
		                  <td>
		                   <div class="tx_field ">
		                     <input type="text" class="input-sm form-control print_input_m" id="txh_sjcll" name="txh_sjcll" value="${txpgh.txh_sjcll}"  />
		                   </div>
		                  </td>
		                  <td><div class="tx_field_title" style="min-width: 100px;">实际置换量(L):</div></td>
		                  <td>
		                   <div class="tx_field ">
		                     <input type="text" class="input-sm form-control print_input_m" id="txh_sjzhl" name="txh_sjzhl" value="${txpgh.txh_sjzhl}" />
		                   </div>
		                  </td>
		                  <td><div class="tx_field_title" style="min-width: 100px;">实际治疗时长:</div></td>
		                  <td>
		                   <div class="tx_field " style="min-width:215px;">
		                      <input type="text" style="width: 45%;display: inline-block;max-width: 80px;" class="input_m form-control print_input_m" id="txh_sjsc_h" name="txh_sjsc_h" value="${txpgh.txh_sjsc_h}"  /><b>h</b>&nbsp;
		                      <input type="text" style="width: 45%;display: inline-block;max-width: 80px;" class="input-m form-control print_input_m" id="" name="txh_sjsc_f" value="${txpgh.txh_sjsc_f}" /><b>min</b>
		                   </div>
		                  </td>
		                  <td><div class="tx_field_title" ></div></td>
		                  <td>
		                   <div class="tx_field ">
		                     
		                   </div>
		                  </td>
			           </tr>
			           
			           <tr>
		                  <td><div class="tx_field_title" >称重方式:</div></td>
		                  <td>
		                   <div class="tx_field ">
		                       <select id="txh_czfs" class="input-sm form-control hidden-print" onchange="th_czfsChange();" >
			                     <option value="正常" >正常</option>
			                     <option value="1" <c:if test="${txpgh.txh_tz=='-1'||txpgh.txh_tz=='卧床'}">selected="selected"</c:if>>卧床</option>
			                     <option value="拒测" <c:if test="${txpgh.txh_tz=='拒测'}">selected="selected"</c:if>>拒测</option>
			                   </select>
		                   </div>
		                  </td>
		                  <td><div class="tx_field_title" >透后体重(kg):</div></td>
		                  <td>
		                   <div class="tx_field ">
		                      <input  type="text" class="input-sm form-control print_input_m" id="txh_tz" name="txh_tz" oninput="calc_txh_tzjs();" value="<c:choose><c:when test="${txpgh.txh_tz=='-1'}">卧床</c:when><c:otherwise>${txpgh.txh_tz}</c:otherwise></c:choose>"  />
		                   </div>
		                  </td>
		                  <td><div class="tx_field_title" >体重减少(kg):</div></td>
		                  <td>
		                   <div class="tx_field ">
		                       <input  type="text" readonly="readonly" class="input-sm form-control print_input_m" id="txh_tzjs" name="txh_tzjs" value="<c:choose><c:when test="${txpgh.txh_tz=='-1'||txpgq.tx_tqtz=='-1'||txpgq.tx_tqtz=='卧床'}">/</c:when><c:when test="${empty txpgh.txh_tz||empty txpgq.tx_tqtz}"></c:when><c:otherwise>${txpgh.txh_tzjs}</c:otherwise></c:choose>"  />
		                   </div>
		                  </td>
		                  <td><div class="tx_field_title" ></div></td>
		                  <td>
		                   <div class="tx_field ">
		                     
		                   </div>
		                  </td>
			           </tr>
			           
			           <tr>
		                  <td><div class="tx_field_title" >凝血:</div></td>
		                  <td>
		                   <div class="tx_field ">
		                      <input type="text" class="input-sm form-control print_input_m" id="txh_nx_name"  name="txh_nx_name" value="${txpgh.txh_nx_name}"  readonly="readonly"  onclick="FCheckBox('txh_nx',this);" />
					          <input type="hidden" class="input-sm form-control" id="txh_nx_id"  name="txh_nx_id" value="${txpgh.txh_nx_id}"  readonly="readonly"  />
		                   </div>
		                  </td>
		                  
		                  <td><div class="tx_field_title" >透后症状:</div></td>
		                  <td>
		                   <div class="tx_field ">
		                     <input type="text" class="input-sm form-control print_input_m" id="txh_tqzz_name"  name="txh_tqzz_name" value="${txpgh.txh_tqzz_name}"  readonly="readonly"  onclick="FCheckBox('txh_tqzz',this);" />
					         <input type="hidden" class="input-sm form-control" id="txh_tqzz_id"  name="txh_tqzz_id" value="${txpgh.txh_tqzz_id}"  readonly="readonly"  />
		                   </div>
		                  </td>
		                  
		                  <td><div class="tx_field_title" >透析中入量</div></td>
		                  <td>
		                   <div class="tx_field ">
		                      <input type="text" class="input-sm form-control print_input_m" id="txh_txzrl_h" name="txh_txzrl_h_hidden" value="${txpgh.txh_txzrl_h}" readonly="readonly" onclick="gettxh_txzrl_h();"  />
				              <input type="hidden" id="txh_txzrl_h_hidden" name="txh_txzrl_h" value="${txpgh.txh_txzrl_h}" />
		                   </div>
		                  </td>
		                  
		                  <td><div class="tx_field_title" ></div></td>
		                  <td><div class="tx_field "></div></td>
			           </tr>
			           
			           <tr>
		                  <td><div class="tx_field_title" >内瘘:</div></td>
		                  <td>
		                   <div class="tx_field ">
		                      <input type="text" class="input-sm form-control print_input_m" id="txh_nl_name" name="txh_nl_name" value="${txpgh.txh_nl_name}" readonly="readonly" onclick="FCheckBox('txh_nl',this);"  />
				              <input type="hidden" class="input-sm form-control" id="txh_nl_id" name="nl_id" value="${txpgh.txh_nl_id}" readonly="readonly"  />
		                   </div>
		                  </td>
		                  <td><div class="tx_field_title" >导管:</div></td>
		                  <td>
		                   <div class="tx_field ">
		                      <input type="text" class="input-sm form-control print_input_m" id="txh_dg_name" name="txh_dg_name" value="${txpgh.txh_dg_name}" readonly="readonly"  onclick="FCheckBox('txh_dg',this);"  />
				              <input type="hidden" class="input-sm form-control" id="txh_dg_id" name="txh_dg_id" value="${txpgh.txh_dg_id}" readonly="readonly"  />
		                   </div>
		                  </td>
		                  <td><div class="tx_field_title" >并发症:</div></td>
		                  <td>
		                   <div class="tx_field ">
		                      <input type="text" class="input-sm form-control print_input_m" id="txh_hbz_name" name="txh_hbz_name" value="${txpgh.txh_hbz_name}"  readonly="readonly" onclick="FCheckBox('txh_hbz',this);" />
				              <input type="hidden" class="input-sm form-control" id="txh_hbz_id" name="txh_hbz_id" value="${txpgh.txh_hbz_id}"  readonly="readonly" />
		                   </div>
		                  </td>
		                  <td><div class="tx_field_title" ></div></td>
		                  <td>
		                   <div class="tx_field ">
		                     
		                   </div>
		                  </td>
			           </tr>
			      </table>
			     </form>
	          
	          
	          <!-- 治疗小结 -->  
			  <form class="form-inline" id="tx_zxlj_form">
		       <input type="hidden" class="tx_number" name="tx_number" value="${tx_number}" />
              <input type="hidden"  value="${tx_number}" id="tx_number_zlxj" />
		       <input type="hidden" name="tx_time"  value="${tx_txdate}" />
		       <input type="hidden"  id="txxj_pdzt" value="${txzlxj.tx_status }" />
		         <input type="hidden" id="tx_sf"  value="0" />
		       <input type="hidden" id="tx_sf1"  value="" />
		       <input type="hidden" class="info_input_id" name="tx_sj_nurse_id" value="${txzlxj.tx_sj_nurse_id}" />
		       <input type="hidden" class="info_input_id" name="tx_zl_nurse_id" value="${txzlxj.tx_zl_nurse_id}" />
		       <input type="hidden" class="info_input_id" name="tx_hd_nurse_id" value="${txzlxj.tx_hd_nurse_id}" />
		       <input type="hidden" class="info_input_id" name="tx_xj_nurse_id" value="${txzlxj.tx_xj_nurse_id}" />
		       <input type="hidden" class="info_input_id" name="tx_zl_doctor_id" value="${txzlxj.tx_zl_doctor_id}" />
		       
		       <table class="table " id="tx_zxlj_table" style="margin-bottom: 0px; ">
		         <tr><td rowspan="8" class="tx_title_td"><div class="tx_title">治<br>疗<br>小<br>结</div></td></tr>
		         <c:if test='${empty param.tx_no}'>
		         <tr>
		           <td colspan="8">
	                     <c:if test='${txzlxj.tx_status=="0"|| empty txzlxj.tx_status}'><span class="head_confirm_status">未确认</span></c:if>
	                     <c:if test='${txzlxj.tx_status=="1"}'><span class="head_confirmed_name">${txzlxj.tx_confirm_username}</span> <span class="head_confirmed">已确认</span></c:if>
		                 <button type="button"  class="btn btn-info btn-base save_txform_zlxj" onclick="confirmzlxj();">确认</button>
		           </td>
		         </tr>
		         </c:if>
		         
			     <tr>
			       <td colspan="8">
			       <!-- <img src="image/yunjing/tx_xiaojie_muban.png" alt="模版" class="hidden-print" width="50px"/><b class="hidden-print" style="color:#2187cc;font-size: 14px;">:</b>-->
			        <label for="" class="control-label">透后宣教:</label>
			        <select class="form-control input-sm hidden-print" id="th_xj_muban" onchange="Chooseth_xjmb();"  style="width: 120px;display: inline-block;">
			          <option value="">==请选择==</option>
			          <c:forEach  items="${txh_xj}" var="xj" >
			              <option value="${xj.tx_txxj_t}" >${xj.tx_name_t}</option>
					  </c:forEach>
			         </select> 
			       </td>
			     </tr>
			     <tr>
			       <td colspan="8">
			            <textarea rows="5" style="width:100%;" class="input-sm form-control print_textarea" id="tx_zlxj_content" name="tx_zlxj_content" style="text-align:left;" >${txzlxj.tx_zlxj_content}</textarea>
			       </td>
			     </tr>
			     <tr>
			       <td colspan="8">
			          <label for="" class="control-label">透析小结:</label>
			          <select class="form-control input-sm hidden-print" id="tx_xiaojie_muban" onchange="Choosetx_xjmb();"  style="width: 120px;display: inline-block;">
			          <option value="">==请选择==</option>
			          <c:forEach  items="${xiaojie}" var="xj" >
			              <option value="${xj.dicid}" >${xj.dicname}</option>
					  </c:forEach>
			         </select> 
			          <button type="button" data-module="2" class="btn btn-info btn-base" onclick="dcdbcjl();">导出</button>
			       </td>
			     </tr>
			     <tr>
			       <td colspan="8">
			         <textarea rows="5" style="width:100%;" class="input-sm form-control print_textarea" id="tx_zlxj_xj"  name="tx_zlxj_xj" style="text-align:left;">${txzlxj.tx_zlxj_xj}</textarea>
			       </td>  
			     </tr>
			     <tr class="tx-zlxj-row1">
			       <td>
			         <label for="" class="control-label">穿刺/换药:</label>
			         <select class="input-sm form-control print_select" name="tx_zl_fs"  style="min-width:90px;" onchange="changetx_zl_fs(this.value);" >
			              <option value="0">穿刺</option>
			              <option value="1">换药</option>
			         </select>
			       </td>
			       <td>
			         <label for="" class="control-label"><span class="cc_hy_label">穿刺</span>护士:</label>
			          <div class="print_select_cover" >
			         <select class="input-sm form-control print_select" name="tx_sj_nurse" id="tx_sj_nurse" >
			          <c:if test="${txzlxj.tx_sj_nurse==null||txzlxj.tx_sj_nurse==''}"> <option value="">==请选择==</option> </c:if>
			          <c:forEach  items="${userlist}" var="user" >
			             <c:if test="${user.USER_PERMISSION==3||user.USER_PERMISSION==4}">
			                <c:choose>
			                 <c:when test="${user.USER_NAME==txzlxj.tx_sj_nurse}"> <option data-id="${user.USER_ID}" value="${user.USER_NAME}" selected="selected">${user.USER_NAME}</option></c:when>
			                  <c:otherwise> <option  data-id="${user.USER_ID}" value="${user.USER_NAME}" >${user.USER_NAME}</option></c:otherwise>
			                </c:choose>
			             </c:if>
					  </c:forEach>
			         </select> 
			         </div>
			       </td>
			       
			       
			       <td>
			         <label for="" class="control-label">治疗护士:</label>
			         <div class="print_select_cover" >
			         <select class="input-sm form-control print_select" name="tx_zl_nurse" id="tx_zl_nurse" >
			          <c:if test="${txzlxj.tx_zl_nurse==null||txzlxj.tx_zl_nurse==''}"> <option value="">==请选择==</option> </c:if>
			          <c:forEach  items="${userlist}" var="user" >
			             <c:if test="${user.USER_PERMISSION==3||user.USER_PERMISSION==4}">
			                <c:choose>
			                 <c:when test="${user.USER_NAME==txzlxj.tx_zl_nurse}"> <option  data-id="${user.USER_ID}" value="${user.USER_NAME}" selected="selected">${user.USER_NAME}</option></c:when>
			                  <c:otherwise> <option  data-id="${user.USER_ID}" value="${user.USER_NAME}" >${user.USER_NAME}</option></c:otherwise>
			                </c:choose>
			             </c:if>
					  </c:forEach>
			         </select> 
			         </div>
			       </td>
			       <td>
			         <label for="" class="control-label">核对护士:</label>
			         <div class="print_select_cover" >
			         <select class="input-sm form-control print_select" name="tx_hd_nurse" id="tx_hd_nurse" >
			          <c:if test="${txzlxj.tx_hd_nurse==null||txzlxj.tx_hd_nurse==''}"> <option value="">==请选择==</option> </c:if>
			          <c:forEach  items="${userlist}" var="user" >
			             <c:if test="${user.USER_PERMISSION==3||user.USER_PERMISSION==4}">
			               <c:choose>
			                 <c:when test="${user.USER_NAME==txzlxj.tx_hd_nurse}"> <option  data-id="${user.USER_ID}" value="${user.USER_NAME}" selected="selected">${user.USER_NAME}</option></c:when>
			                  <c:otherwise> <option  data-id="${user.USER_ID}" value="${user.USER_NAME}" >${user.USER_NAME}</option></c:otherwise>
			                </c:choose>
			             </c:if>
					  </c:forEach>
			         </select>
			         </div> 
			       </td>
			       <td>
			         <label for="" class="control-label">下机护士:</label>
			         <div class="print_select_cover" >
			         <select class="input-sm form-control print_select" name="tx_xj_nurse" id="tx_xj_nurse" >
			         <c:if test="${txzlxj.tx_xj_nurse==null||txzlxj.tx_xj_nurse==''}"> <option value="">==请选择==</option> </c:if>
			         <c:forEach  items="${userlist}" var="user" >
			             <c:if test="${user.USER_PERMISSION==3||user.USER_PERMISSION==4}">
			                <c:choose>
			                 <c:when test="${user.USER_NAME==txzlxj.tx_xj_nurse}"> <option  data-id="${user.USER_ID}" value="${user.USER_NAME}" selected="selected">${user.USER_NAME}</option></c:when>
			                  <c:otherwise> <option  data-id="${user.USER_ID}" value="${user.USER_NAME}" >${user.USER_NAME}</option></c:otherwise>
			                </c:choose>
			             </c:if>
					  </c:forEach>
			         </select> 
			         </div>
			       </td>
			       <td>
			         <label for="" class="control-label">治疗医生:</label>
			         <div class="print_select_cover" >
			         <select class="input-sm form-control print_select" name="tx_zl_doctor" id="tx_zl_doctor" >
			           <c:if test="${txzlxj.tx_zl_doctor==null||txzlxj.tx_zl_doctor==''}"> <option value="">==请选择==</option> </c:if>
			           <c:forEach  items="${userlist}" var="user" >
			             <c:if test="${user.USER_PERMISSION==2||user.USER_PERMISSION==1}">
			                <c:choose>
			                 <c:when test="${user.USER_NAME==txzlxj.tx_zl_doctor}"> <option  data-id="${user.USER_ID}" value="${user.USER_NAME}" selected="selected">${user.USER_NAME}</option></c:when>
			                  <c:otherwise> <option  data-id="${user.USER_ID}" value="${user.USER_NAME}" >${user.USER_NAME}</option></c:otherwise>
			                </c:choose>
			             </c:if>
					  </c:forEach>
			         </select> 
			         </div>
			       </td>
			     </tr>
			     <tr class="txfs-tr-cc">
			     	<td class="td_cc_fs border-0">
			         <label for="" class="control-label">穿刺方式:</label>
			         <input type="text" class="input-sm form-control print_input_m" id="tx_ccfs" name="tx_ccfs" value="<c:choose><c:when test="${sessionScope.client_flag=='0'}">${txpgq.tx_ccfs}</c:when><c:when test="${sessionScope.client_flag=='1'}">${txzlxj.tx_ccfs}</c:when></c:choose>" onchange="switchCcfs();"  readonly="readonly"  />
			       </td>
			       <td class="td_cc_z border-0">
			          <label for="" class="control-label">穿刺针:</label>
			          <input type="text" class="input-sm form-control print_input_m" id="tx_ccz" name="tx_ccz" value="<c:choose><c:when test="${sessionScope.client_flag=='0'}">${txpgq.tx_ccz}</c:when><c:when test="${sessionScope.client_flag=='1'}">${txzlxj.tx_ccz}</c:when></c:choose>"  readonly="readonly" />
			       </td>
			       <td class="tx_ccfx border-0">
			         <label for="" class="control-label">A端穿刺方向:</label>
			         <div class="print_select_cover" >
				         <input type="text" class="info_input input-sm form-control" style="max-width:136px;" name="tx_ccfx" id="tx_ccfx" value="${txzlxj.tx_ccfx}" readonly="readonly" placeholder="请选择">
			         </div>
			       </td>
			       <td class="tx_ccwd border-0">
			         <label for="" class="control-label">穿刺位点:</label>
			         <div class="print_select_cover" >
			         	<input type="hidden" class="info_input"  name="tx_ccwd_a" id="selectMark_a" value="${txzlxj.tx_ccwd_a}" readonly="readonly" placeholder="请选择"  />
					    <input type="hidden" class="info_input"  name="tx_ccwd_v" id="selectMark_v" value="${txzlxj.tx_ccwd_v}" readonly="readonly" placeholder="请选择"  /> 
				        <input type="text" class="info_input input-sm form-control"   name="tx_ccwd" id="selectMark_show" value="<c:if test="${not empty txzlxj.tx_ccwd_a && not empty txzlxj.tx_ccwd_v}">A端：${txzlxj.tx_ccwd_a},V端：${txzlxj.tx_ccwd_v}</c:if>" readonly="readonly" placeholder="请选择"  /> 
			         </div>
			       </td>
			       <td class="tx_tlpic border-0">
			         <label for="" class="control-label">通路图片:</label>
			         <div class="print_select_cover" >
			         	<input type="text" class="info_input input-sm form-control"   name="tx_tltp" id="tx_viewpic" value="" readonly="readonly" placeholder="点击查看"  /> 
			         </div>
			       </td>
			     </tr>
			    </table>
			    </form>
			    
			 </div>   
	           <!-- 按钮 -->  
			  <div class="" style="text-align: center;"> 
			   <%-- <button type="button" class="btn btn-info hidden-print" style="margin:10px;" onclick="SaveData();" >保存数据</button> --%>
		       <%-- <button type="button" class="btn btn-info hidden-print" id="" style="float:right;margin:10px;" onclick="tx_print();" >打印透析单</button>--%>
			  </div>
			  
			  <!-- 透析中入量 -->
			  <form class="zrl_form" style="display: none;">
			    <div class="form-group ">
			    <label for="zrl0">进食(L):</label>
			    <input type="number" class="form-control inline_input" id="zrl0" placeholder="" maxlength="10" />
			    </div>
			    
			    <div class="form-group ">
			    <label for="zrl1">输液(L):</label>
			    <input type="number" class="form-control inline_input" id="zrl1" placeholder="" maxlength="10" />
			    </div>
			    
			    <div class="form-group ">
			    <label for="zrl2">输血(L):</label>
			    <input type="number" class="form-control inline_input" id="zrl2"  placeholder="" maxlength="10" />
			    </div>
			    
			    <div class="form-group ">
			    <label for="zrl3">冲管(L):</label>
			    <input type="number" class="form-control inline_input" id="zrl3" placeholder="" maxlength="10" />
			    </div>
			    <br/>
			    <div class="col-sm-6" style="padding: 15px;text-align: center;"><button class="btn btn-info" type="button" onclick="closetxh_txzrl_h(0);">取消</button></div>
			    <div class="col-sm-6" style="padding: 15px;text-align: center;"><button class="btn btn-info" type="button" onclick="closetxh_txzrl_h(1);">确认</button></div>
			  </form>
			   
			  <div class="tx_zl_doctor" style="display: none;">
			    <form class="form-inline">
			        <table class="table" style="width: 100%;margin-bottom: 0px;height: 140px;">
			          <tr>
			           <td align="center">
			            <label for="tx_zl_doctor_select" class="control-label">医生:</label>
			            <select name="tx_zl_doctor_select" class="form-control tx_zl_doctor_select"></select>
				      </td>
			          </tr>
			          <tr>
			           <td align="center"  style="border: 0px;font-size: 16px;" >
			            <button type="button" class="btn btn-info tx_zl_doctor_confirm" style="margin-right: 25px;">确认</button>
			            <button type="button" class="btn btn-default tx_zl_doctor_cancel">取消</button>
			           </td>
			          </tr>
			        </table>
			    </form>
			 </div> 
			 
			 <!-- 自查模块提示 -->
			 <div class="txreport" style="display: none;padding: 40px 15px 0px 15px;">
			      <table class="table table-bordered" style="">
			         <tr><td align="center"><b>模块</b></td> <td align="center"><b>提示</b></td></tr>
			         <tr class="txreport_txq"><td align="center">透前评估</td> <td align="center"></td></tr>
			         <tr class="txreport_dbcheck"><td align="center">双人核对</td> <td align="center"></td></tr>
			         <tr class="txreport_jcjl"><td align="center">监测记录</td> <td align="center"></td></tr>
			         <tr class="txreport_lsyz"><td align="center">临时医嘱</td> <td align="center"></td></tr>
			         <tr class="txreport_txh"><td align="center">透后评估</td> <td align="center"></td></tr>
			         <tr class="txreport_zlxj"><td align="center">治疗小结</td> <td align="center"></td></tr>
			      </table>
			      <div style="text-align: center;"><button type="button" class="btn btn-info txreport_confirm_btn" onclick="">确认</button></div>
			 </div>
			 
			 <!-- 透析单批量打印 -->
		     <div class="txform_batch_print" style="display: none;" >
		       <form class="form-inline" style="border-bottom: 0px;">
			        <table class="table" style="width: 100%;margin-bottom: 0px;padding: 15px;">
			          <tr>
			           <td align="left" colspan="2"><span class="tx_batch_word">姓名：${hzda.tx_name}</span>  <span class="tx_batch_word" style="margin-left: 100px;">透析号：${param.tx_number}</span></td>
			          </tr>
			          <tr>
			             <td  style="vertical-align: middle;"><span class="tx_batch_word">透析日期：</span></td>
			             <td style="border: 0px;">
			                <div class="tx_datetime_div">
			                  <input type="text" id="txbatch_start_time" name="txbatch_start_time" class="form-control tx_input_datetime form_datetime_ymd_txform" value="<fmt:formatDate value="${now}" pattern='yyyy-MM-dd' />" onchange="" readonly="readonly" onclick="getTxrq();" />
			                  <span class="glyphicon glyphicon-calendar" style="color: #4579C5"></span>&nbsp;
			                </div>
			                <span>—</span>
			                <div class="tx_datetime_div">
 			                  <input type="text" id="txbatch_end_time" name="txbatch_end_time" class="form-control tx_input_datetime form_datetime_ymd_txform" value="<fmt:formatDate value="${now}" pattern='yyyy-MM-dd' />" onchange="" readonly="readonly" onclick="getTxrq();"  />
 			                  <span class="glyphicon glyphicon-calendar" style="color: #4579C5;"></span>&nbsp;
			                </div>
			             </td>
			          </tr>
			          <tr>
			           <td align="center"  style="border: 0px;font-size: 16px;padding-top: 15px;" colspan="2">
			            <button type="button" class="btn btn-info tx_batch_confirm" style="margin-right: 25px;" onclick="txformbatch();">打印</button>
			            <button type="button" class="btn btn-default tx_batch_cancel" onclick="parent.layer.close(parent.txbatchpage);">取消</button>
			           </td>
			          </tr>
			        </table>
			    </form>
		     </div>
		     
		     <!-- 修改住院号门诊号 -->
		     <div class="tx_update_hzhospid" style="display: none;">
			    <form class="form-inline" style="border: 0px;margin-top: 40px;">
			        <table class="" style="width: 100%;margin-bottom: 0px;height: 140px;">
			          <tr>
			           <td align="right"><label for="tx_hzhosptype_select" class="control-label">住院/门诊:&nbsp;&nbsp;&nbsp;&nbsp;</label></td>
			           <td align="left">
			            <select name="tx_hzhosptype_select" id="tx_hzhosptype_select" class="form-control" disabled="disabled">
			                <option value="0">住院</option>
			                <option value="1">门诊</option>
			            </select>
				      </td>
			          </tr>
			          <tr><td colspan="2">&nbsp;</td></tr>
			          <tr>
			           <td align="right"><label for="tx_hzhosptype" class="control-label">住院号/门诊号:&nbsp;&nbsp;&nbsp;&nbsp;</label></td>
			           <td align="left">
			            <input class="form-control" value="" name="tx_hzhospid_input" id="tx_hzhospid_input" maxlength="30" />
				       </td>
			          </tr>
			          <tr>
			           <td align="center"  style="border: 0px;font-size: 16px;" colspan="2" >
			            <button type="button" class="btn btn-info tx_update_hzhospid_confirm" style="margin-right: 25px;margin-top: 45px;" onclick="updatehzhospid_confirm();">确认</button>
			            <button type="button" class="btn btn-default tx_update_hzhospid_cancel" style="margin-top: 45px;">取消</button>
			           </td>
			          </tr>
			        </table>
			    </form>
			 </div>
			 
  </body>
  <style>
     .zrl_form{width:400px;border: 0px !important;margin: 0 auto;padding: 20px;}
     .zrl_form_module{margin:0 auto;}
     .inline_input{
       display: inline-block;
	   width: auto;
	   vertical-align: middle;
	   width: 80%;
     }
     
     .tx_form_istx{
       font-size:8px !important;
       background-color:#e02d2d !important;
       color:white !important;
       vertical-align: super !important;
       position: absolute !important;
       top: 0px !important;
       left: 0px !important;
       font-family:"Microsoft YaHei",微软雅黑,"Microsoft JhengHei",华文细黑,STHeiti,MingLiu;
       height:15px !important;
       width:15px !important;
     }
     
   div.datetimepicker .table>tbody>tr>td{
    padding:12px;
    line-height: 1.42857143;
    vertical-align: top;
    border-top: 1px solid #ddd;
   }
   .datetimepicker table tr td.day {
	border:5px;
	cursor: pointer;
   }
   .datetimepicker table tr td.day:hover {
    outline: #fb0 auto 5px;
	cursor: pointer;
   }  
   
   
   
   /********2017/07/12**********/
   .tx_process_btn{display: inline-block;}
   .btn-base{
      width:85px; 
   }
   .btn-left{
     margin-left: 25px;
   }
   .tx_table{margin-bottom: 0px !important;}
   .tx_table>tbody>tr>td{
     border-top:0px !important;
   }
   
   .tx_title_td{
     vertical-align: middle !important;
     background-color: #BADEF6;
     width: 40px;
     max-width: 40px;
   }
   .tx_title{
     width:20px;
     text-align: center;
     color: #1e8cd7;
     font-weight: bold;
   }
   
   .head_confirm_status {
     font-size: 14px;
     color: #EF2525;
     padding-right: 15px;
	}
   .head_confirmed{
     font-size: 14px;
     color: #5cb85c;
     padding-right: 15px;
   }	
   .tx_field_title{
      text-align:right;
      font-weight:700;
      line-height: 1.5;
      padding: 5px 0px;
    }
   .tx_field_title_m{
      text-align:center;
      font-weight:700;
      line-height: 1.5;
      padding: 5px 0px;
    }	
   .tx_field{
	  text-align: left;
	}
	.tx_input{
	  min-width: 120px;
	}
  .template_checkbox{
        -webkit-appearance: none;
	    appearance: none;
	    outline:0;
	    font-size: 0;
	    border: 1px solid #5bc0de;
	    background-color: #FFFFFF;
	    border-radius: 3px;
	    width: 20px;
	    height: 20px;
	    position: relative;
	    vertical-align: 0;
	    top: 2px;
    }
    .template_checkbox:checked:before {
    font-family: "weui";
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    text-align: center;
    speak: none;
    display: inline-block;
    vertical-align: middle;
    text-decoration: inherit;
    content: "\EA08";
    color: #3ea2ee;
    font-size: 22px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -48%) scale(0.73);
    -webkit-transform: translate(-50%, -48%) scale(0.73);
}
  .tx_common_field{
    padding:5px;line-height: 1.5;text-align: center; 
  }
  
  .tx_datetime_div{border: 1px solid #ddd;display: inline-block;border-radius:4px;}
  .tx_input_datetime{border: 0px;height: 30px;display: inline-block;width: auto;text-align: center;padding: 6px;width: 130px;-webkit-box-shadow:none;background-color: #fff !important;}
  .tx_batch_word{color: #777777; font-size: 16px; line-height: 30px;}
  	
  </style>
  <div id="view-markpic-wrap" style="display:none;">
        <div class="shadow"></div>
        <div id="markpicWarp2">
        	<div class="mtx-markpic-wrap" style="position:absolute;top:50%;left:50%;transform: translate(-50%, -50%); width:602px;height:802px;">
	        	<div id="point_mark_img_wrap1"><img src="" alt="血管通路图片"></div>
	            <div class="close-view-img_"><span class="close-view-img">×</span></div>
        	</div>
        </div>
  </div>
  <script src="https://s13.cnzz.com/z_stat.php?id=1263104855&web_id=1263104855" language="JavaScript"></script>
  <script>
   //初始化
   $(function(){  
     //是否显示流程按钮(当天未排班和历史透析单不显示流程按钮,除了是跨凌晨透析的患者)
     if(""==$("input[name='pbflag']").val()||"${param.tx_txdate}"!="${tx_time}"){
         if("5"!=$("#tx_bc").val()){$("div.tx_process_btn").hide()};
     }
     
     //判断透析单权限（结束透析后24小时后只有(管理员)治疗护士、治疗医生那个账号可以修改透析记录）
     if(${tx_status.tx_status>=3 && tx_status.tx_status<5}){
         if(parseInt("${servtime}")>1440){
             if('${userinfo.USER_PERMISSION}'!='0' && '${userinfo.USER_ID}'!=''){
                 if(''=='${txzlxj.tx_zl_nurse_id}'||''=='${txzlxj.tx_zl_doctor_id}'){
                    if('${userinfo.USER_NAME}'=='${txzlxj.tx_zl_nurse}'||'${userinfo.USER_NAME}'=='${txzlxj.tx_zl_doctor}'){}else{
	                     $("button.save_hztcxf_txform").addClass("hidden");
	                     $("button.mtxform_hztqpg_save").addClass("hidden");
	                     $("button.save_double_check_txform").addClass("hidden");
	                     $("button.tx_jcjlconfirm_btn").addClass("hidden");
	                     $("button.tx_jcjladd_btn").addClass("hidden");
	                     $("button.tx_jcjldel_btn").addClass("hidden");
	                     $("button.save_txform_thpg").addClass("hidden");
	                     $("button.save_txform_zlxj").addClass("hidden");
	                 }
                 }else{
	                 if('${userinfo.USER_ID}'=='${txzlxj.tx_zl_nurse_id}'||'${userinfo.USER_ID}'=='${txzlxj.tx_zl_doctor_id}'){}else{
	                     $("button.save_hztcxf_txform").addClass("hidden");
	                     $("button.mtxform_hztqpg_save").addClass("hidden");
	                     $("button.save_double_check_txform").addClass("hidden");
	                     $("button.tx_jcjlconfirm_btn").addClass("hidden");
	                     $("button.tx_jcjladd_btn").addClass("hidden");
	                     $("button.tx_jcjldel_btn").addClass("hidden");
	                     $("button.save_txform_thpg").addClass("hidden");
	                     $("button.save_txform_zlxj").addClass("hidden");
	                 }
                 }
             }
         }
     }
     //判断是否归档，归档之后只有管理员可以修改
     if(${tx_status.tx_status==5}){
         if('${userinfo.USER_PERMISSION}'!='0' && '${userinfo.USER_ID}'!=''){
                 $("button.save_hztcxf_txform").addClass("hidden");
                 $("button.mtxform_hztqpg_save").addClass("hidden");
                 $("button.save_double_check_txform").addClass("hidden");
                 $("button.tx_jcjlconfirm_btn").addClass("hidden");
                 $("button.tx_jcjladd_btn").addClass("hidden");
                 $("button.tx_jcjldel_btn").addClass("hidden");
                 $("button.save_txform_thpg").addClass("hidden");
                 $("button.save_txform_zlxj").addClass("hidden");
                 //医嘱
                 $("#tx_yzprocess_btn").html("&nbsp;");
         }
     }
     
     
     //初始化透析单标记已透日期的时间控件
     $(".form_datetime_ymd_txform").datetimepicker_txform({
        format: 'yyyy-mm-dd',
        language:  'zh-CN',
        weekStart: 1,
        todayBtn:  1,
		autoclose: 1,
		todayHighlight: 1,
		startView: 2,
		minView: 2,
		forceParse: 0,
		keyboardNavigation:1,
		forceParse:1
      }); 
   
       //上次透后预增脱水量
     if("未确认"==$("#txq_pg_form").find("span.head_confirm_status").text()){
        $("input[name='tx_yztsl']").val("${lastyztsl}");
     }
     calc_mbtsl();//计算目标脱水量
     inittxzrl();
     txfsChange();
     knjinit(); 
     nl_dg();//内篓导管默认值
     clac_tx_clzl();//计算超滤总量
     calc_tx_tzzj();//计算体重增加  
     initdbcheck();//双人核对
     gethzjcjl();//监测记录
     gethzyzlist();//医嘱
     initthpg();//透后评估
     //穿刺换药
     if("0"=="${sessionScope.client_flag}"){
        if(""=="${txpgq.tx_ccfs}"||""=="${txpgq.tx_ccz}"){changetx_zl_fs("1");}else{changetx_zl_fs("0");}
     }
     if("1"=="${sessionScope.client_flag}"){
        if(""=="${txzlxj.tx_ccfs}"||""=="${txzlxj.tx_ccz}"){changetx_zl_fs("1");}else{changetx_zl_fs("0");}
     }
   });
   
   //选择血压类型
   function choosebptype(ele,p){
     var t1=(p=="txq"?"${txpgq.tx_pg_BP_shousuo}":"${txpgh.tx_pg_BP_shousuo}");
     var t2=(p=="txq"?"${txpgq.tx_pg_BP_shuzhang}":"${txpgh.tx_pg_BP_shuzhang}");
     switch ($(ele).val()) {
		case "0":
		    $(ele).parent("div.tx_field ").find("input[name='tx_pg_BP_shousuo']").removeAttr("readonly").val(t1);
			$(ele).parent("div.tx_field ").find("input[name='tx_pg_BP_shuzhang']").removeAttr("readonly").val(t2);
			break;
		case "1":
		    $(ele).parent("div.tx_field ").find("input[name='tx_pg_BP_shousuo']").removeAttr("readonly").val(t1);
			$(ele).parent("div.tx_field ").find("input[name='tx_pg_BP_shuzhang']").removeAttr("readonly").val(t2);
			break;
	    case "2":
			$(ele).parent("div.tx_field ").find("input[name='tx_pg_BP_shousuo']").attr("readonly","readonly").val("拒测");
			$(ele).parent("div.tx_field ").find("input[name='tx_pg_BP_shuzhang']").attr("readonly","readonly").val("拒测");
			
		    $(ele).parents("form").find("input[name='tx_pg_t']").val("/");
		    $(ele).parents("form").find("input[name='tx_pg_p']").val("/");
		    $(ele).parents("form").find("input[name='tx_pg_hr']").val("/");
			break;
		case "3":
			$(ele).parent("div.tx_field ").find("input[name='tx_pg_BP_shousuo']").attr("readonly","readonly").val("测不出");
			$(ele).parent("div.tx_field ").find("input[name='tx_pg_BP_shuzhang']").attr("readonly","readonly").val("测不出");
			break;
		case "4":
		    $(ele).parent("div.tx_field ").find("input[name='tx_pg_BP_shousuo']").attr("readonly","readonly").val("/");
			$(ele).parent("div.tx_field ").find("input[name='tx_pg_BP_shuzhang']").attr("readonly","readonly").val("/");
			
		    $(ele).parents("form").find("input[name='tx_pg_t']").val("/");
		    $(ele).parents("form").find("input[name='tx_pg_p']").val("/");
		    $(ele).parents("form").find("input[name='tx_pg_hr']").val("/");
		    break;		
		default:
			break;
	 }
   }
 
   
   //选择透析中入量
   var txzrl_index=null;
   function gettxh_txzrl_h(){
     var zrl= $("#txh_txzrl_h_hidden").val().split(",");
     if(zrl!=""){
        $("#zrl0").val(zrl[0]);
         $("#zrl1").val(zrl[1]);
          $("#zrl2").val(zrl[2]);
           $("#zrl3").val(zrl[3]);
     }
    txzrl_index=layer.open({
      title:"透析中入量",
	  type: 1,
	  skin: 'layui-layer-lan', //加上边框
	  area: ['450px', '400px'], //宽高
	  content: $('.zrl_form')
	 });
   }
   //关闭选择透析中入量
   function closetxh_txzrl_h(param){
     if(param==0){
       /*  $("#zrl0").val("");$("#zrl1").val("");$("#zrl2").val("");$("#zrl3").val("");
        $("#txh_txzrl_h_hidden").val("");
        $("#txh_txzrl_h").val(""); */
     }
     if(param==1){
       $("#txh_txzrl_h_hidden").val($("#zrl0").val()+","+$("#zrl1").val()+","+$("#zrl2").val()+","+$("#zrl3").val())
       $("#txh_txzrl_h").val(floatObj.add(floatObj.add($("#zrl0").val()==""?0:$("#zrl0").val(),$("#zrl1").val()==""?0:$("#zrl1").val()),floatObj.add($("#zrl2").val()==""?0:$("#zrl2").val(),$("#zrl3").val()==""?0:$("#zrl3").val())));
     }
     layer.close(txzrl_index);
   }
   //计算透析中入量
   function inittxzrl(){
     var zrl='${txpgh.txh_txzrl_h}'.split(",");
     if(zrl!=""){
         $("#txh_txzrl_h").val(floatObj.add(floatObj.add(zrl[0]==""?0:zrl[0],zrl[1]==""?0:zrl[1]),floatObj.add(zrl[2]==""?0:zrl[2],zrl[3]==""?0:zrl[3])));
     }
   }
  
   //计算目标脱水量
   function calc_mbtsl(){
     var st= $("#txcf_form").find("span.head_confirm_status").text();
     if("未确认"==st){
	    if(""!=$("input[name='tx_tqtz']").val()&&""!=$("input[name='tx_gtz']").val()){
	       var t=floatObj.subtract($("input[name='tx_tqtz']").val(),$("input[name='tx_gtz']").val());
	       $("input[name='tx_mubiao_ts']").val(isNaN(t)||t==0?"":t);
	       //处方脱水量默认取目标脱水量，处方脱水量可改
	        $("input[name='tx_jcll']").val(isNaN(t)||t==0?"":t);
	    }
     }
   }
  
   //查询透析机对应的机型
   function gettxj_jixing(){
      var txjname=$("select[name='tx_txj_id'] option:selected").val();
       $.ajax({
	       type:"post",
	       data:{"txjname":txjname},
	       url:"user/gettxj_dic.shtml",
	       dataType:"json",
	       success:function(data,status){
	        if(data!=null&&data.dicid!=null){
	           $("input[name='txcf_txjx']").val(data.dicid);
	          }else{ $("input[name='txcf_txjx']").val("");}
	       } 
        });   
   }
  
   function getTxrq(){
     var ymarray=[];
     var ym=$("div.datetimepicker:visible").last().find(".datetimepicker-days .switch").text();
     var datearray=ym.split(" ");
     switch (datearray[0]) {
	   case "一月":ym=datearray[1]+"-"+"01-"+"01";break;
        case "二月":ym=datearray[1]+"-"+"02-"+"01";break;
         case "三月":ym=datearray[1]+"-"+"03-"+"01";break;
          case "四月":ym=datearray[1]+"-"+"04-"+"01";break;
           case "五月":ym=datearray[1]+"-"+"05-"+"01";break;
            case "六月":ym=datearray[1]+"-"+"06-"+"01";break;
             case "七月":ym=datearray[1]+"-"+"07-"+"01";break;
              case "八月":ym=datearray[1]+"-"+"08-"+"01";break;
               case "九月":ym=datearray[1]+"-"+"09-"+"01";break;
                case "十月":ym=datearray[1]+"-"+"10-"+"01";break;
                 case "十一月":ym=datearray[1]+"-"+"11-"+"01";break;
                  case "十二月":ym=datearray[1]+"-"+"12-"+"01";break;
	 }
      var tx_number=$("#tx_number").val();  
      $.ajax({
      type:"get",
      async:false,
      url:"user/gethztxrqByMonth.shtml",
      data:{"tx_number":tx_number,"sj":ym},
      dataType:"json",        
      success:function(data,status){
	       ymarray=data; //标记已透析的日期
       }
      });
     //遍历table标记透析日期 
     $(".datetimepicker-days").find("tr").each(function(){
         $(this).find("td").each(function(index){
             var classstr=$(this).attr("class");
             //当前月份
             if(classstr=='day'){
                 for(var i=0;i<ymarray.length;i++){
	                 if($(this).text()==ymarray[i]){
                         $(this).css("background-color","#CCFFFF").html($(this).text()+"<b class='tx_form_istx'>透</b>");
	                 }
                 }
             }
          });
      });
  }     
   
   
   //计算普通肝素 总量
   function calc_tx_zl(){
     var tx_knj_id=$("input[name='tx_knj_id']").val();
     var knj_str="无肝素,阿加曲班,枸橼酸钠";
     if(knj_str.indexOf(tx_knj_id)<0){
	    var tx_sj=$("input[name='tx_sj']").val(); 
	    var tx_weichi=$("input[name='tx_weichi']").val();  
	    var tx_zlsc=$("input[name='tx_zlsc']").val();
	    //判断抗凝剂的计算公式
	    if("1"=="${knjcalcflag}"||""=="${knjcalcflag}"){
	       $("input[name='tx_zl']").val(floatObj.add(floatObj.multiply(floatObj.subtract(tx_zlsc,0.5),tx_weichi),tx_sj)); 
	     }else{
	       $("input[name='tx_zl']").val(floatObj.add(floatObj.multiply(floatObj.subtract(tx_zlsc,1),tx_weichi),tx_sj)); 
	    }
     }
   }
   
   //抗凝剂初始化
   function knjinit(){
       //抗凝剂对应的内容 
       var valstr=$("#tx_knj option:selected").val();
       switch(valstr){
       case "无肝素":
        //无肝素
        $("#knj_col1").parent("td").prev("td").find("div.tx_field_title").text("首剂(mg)");
        $("#knj_col2").parent("td").prev("td").find("div.tx_field_title").text("维持(mg/h)");
        $("#knj_col3").parent("td").prev("td").find("div.tx_field_title").text("总量(mg)");
       
        $("#knj_col1").html("<input type='text' readonly='readonly' class='print_input input-sm form-control'  name='tx_sj' value='/' oninput='calc_tx_zl();' /> ");
        $("#knj_col2").html("<input type='text' readonly='readonly' class='print_input input-sm form-control'  name='tx_weichi' value='/' oninput='calc_tx_zl();' /> ");
        $("#knj_col3").html("<input type='text' readonly='readonly' class='print_input input-sm form-control'  name='tx_zl' value='/'  /> ");
       break;
       case "普通肝素":
         //普通肝素
         $("#knj_col1").parent("td").prev("td").find("div.tx_field_title").text("首剂(mg)");
         $("#knj_col2").parent("td").prev("td").find("div.tx_field_title").text("维持(mg/h)");
         $("#knj_col3").parent("td").prev("td").find("div.tx_field_title").text("总量(mg)");
         
         $("#knj_col1").html("<input type='text' class='print_input input-sm form-control'  name='tx_sj' value='${txcf.tx_sj}' oninput='calc_tx_zl();' /> ");
         $("#knj_col2").html("<input type='text' class='print_input input-sm form-control'  name='tx_weichi' value='${txcf.tx_weichi}' oninput='calc_tx_zl();' /> ");
         $("#knj_col3").html("<input type='text' class='print_input input-sm form-control'  name='tx_zl' value='${txcf.tx_zl}'  /> ");
       break;
       case "低分子肝素":
         //低分子肝素
         $("#knj_col1").parent("td").prev("td").find("div.tx_field_title").text("首剂(Iu)");
         $("#knj_col2").parent("td").prev("td").find("div.tx_field_title").text("维持(Iu)");
         $("#knj_col3").parent("td").prev("td").find("div.tx_field_title").text("总量(Iu)");
         
         $("#knj_col1").html("<input type='text' class='print_input input-sm form-control'  name='tx_sj' value='${txcf.tx_sj}'  oninput='calc_tx_zl();'  /> ");
         $("#knj_col2").html("<input type='text' class='print_input input-sm form-control'  name='tx_weichi' value='${txcf.tx_weichi}' oninput='calc_tx_zl();' /> ");
         $("#knj_col3").html("<input type='text' class='print_input input-sm form-control'  name='tx_zl' value='${txcf.tx_zl}'  /> ");
        break;
       case "阿加曲班":
         //阿加曲班
         $("#knj_col1").parent("td").prev("td").find("div.tx_field_title").text("首剂(mg)");
         $("#knj_col2").parent("td").prev("td").find("div.tx_field_title").text("维持(mg/h)");
         $("#knj_col3").parent("td").prev("td").find("div.tx_field_title").text("总量(mg)");
         
         $("#knj_col1").html("<input type='text' class='print_input input-sm form-control'  name='tx_sj' value='${txcf.tx_sj}' oninput='calc_tx_zl();' /> ");
         $("#knj_col2").html("<input type='text' class='print_input input-sm form-control'  name='tx_weichi' value='${txcf.tx_weichi}' oninput='calc_tx_zl();' /> ");
         $("#knj_col3").html("<input type='text' class='print_input input-sm form-control'  name='tx_zl' value='${txcf.tx_zl}' /> ");
        break;
       case "枸橼酸钠":
         //枸橼酸钠
         $("#knj_col1").parent("td").prev("td").find("div.tx_field_title").text("维持(ml/h)");
         $("#knj_col2").parent("td").prev("td").find("div.tx_field_title").text("钙名称");
         $("#knj_col3").parent("td").prev("td").find("div.tx_field_title").text("钙剂量(ml/h)");
         
         $("#knj_col1").html("<input type='text' class='print_input input-sm form-control'  name='tx_weichi' value='${txcf.tx_weichi}'  /> ");
         $("#knj_col2").html("<input type='text' class='print_input input-sm form-control'  name='tx_gai_mingcheng' value='${txcf.tx_gai_mingcheng}' />");
         $("#knj_col3").html("<input type='text' class='print_input input-sm form-control'  name='tx_gai_jiliang' value='${txcf.tx_gai_jiliang}'  /> ");
        break;
        default:
         //低分子肝素
         $("#knj_col1").parent("td").prev("td").find("div.tx_field_title").text("首剂(Iu)");
         $("#knj_col2").parent("td").prev("td").find("div.tx_field_title").text("维持(Iu)");
         $("#knj_col3").parent("td").prev("td").find("div.tx_field_title").text("总量(Iu)");
         
         $("#knj_col1").html("<input type='text' class='print_input input-sm form-control'  name='tx_sj' value='${txcf.tx_sj}'  oninput='calc_tx_zl();'  /> ");
         $("#knj_col2").html("<input type='text' class='print_input input-sm form-control'  name='tx_weichi' value='${txcf.tx_weichi}' oninput='calc_tx_zl();' /> ");
         $("#knj_col3").html("<input type='text' class='print_input input-sm form-control'  name='tx_zl' value='${txcf.tx_zl}'  /> ");
        break;
      }  
   }
   
    function knjChange(){
        //抗凝剂对应的内容 
       var valstr=$("#tx_knj option:selected").val();
       switch(valstr){
        case "无肝素":
        //无肝素
        $("#knj_col1").parent("td").prev("td").find("div.tx_field_title").text("首剂(mg)");
        $("#knj_col2").parent("td").prev("td").find("div.tx_field_title").text("维持(mg/h)");
        $("#knj_col3").parent("td").prev("td").find("div.tx_field_title").text("总量(mg)");
       
        $("#knj_col1").html("<input type='text' readonly='readonly' class='print_input input-sm form-control'  name='tx_sj' value='/' oninput='calc_tx_zl();' /> ");
        $("#knj_col2").html("<input type='text' readonly='readonly' class='print_input input-sm form-control'  name='tx_weichi' value='/' oninput='calc_tx_zl();' /> ");
        $("#knj_col3").html("<input type='text' readonly='readonly' class='print_input input-sm form-control'  name='tx_zl' value='/'  /> ");
       break;
       case "普通肝素":
         //普通肝素
         $("#knj_col1").parent("td").prev("td").find("div.tx_field_title").text("首剂(mg)");
         $("#knj_col2").parent("td").prev("td").find("div.tx_field_title").text("维持(mg/h)");
         $("#knj_col3").parent("td").prev("td").find("div.tx_field_title").text("总量(mg)");
         
         $("#knj_col1").html("<input type='text' class='print_input input-sm form-control'  name='tx_sj' value='' oninput='calc_tx_zl();' /> ");
         $("#knj_col2").html("<input type='text' class='print_input input-sm form-control'  name='tx_weichi' value='' oninput='calc_tx_zl();' /> ");
         $("#knj_col3").html("<input type='text' class='print_input input-sm form-control'  name='tx_zl' value=''  /> ");
       break;
       case "低分子肝素":
         //低分子肝素
         $("#knj_col1").parent("td").prev("td").find("div.tx_field_title").text("首剂(Iu)");
         $("#knj_col2").parent("td").prev("td").find("div.tx_field_title").text("维持(Iu)");
         $("#knj_col3").parent("td").prev("td").find("div.tx_field_title").text("总量(Iu)");
         
         $("#knj_col1").html("<input type='text' class='print_input input-sm form-control'  name='tx_sj' value=''  oninput='calc_tx_zl();'  /> ");
         $("#knj_col2").html("<input type='text' class='print_input input-sm form-control'  name='tx_weichi' value='' oninput='calc_tx_zl();' /> ");
         $("#knj_col3").html("<input type='text' class='print_input input-sm form-control'  name='tx_zl' value=''  /> ");
        break;
       case "阿加曲班":
         //阿加曲班
         $("#knj_col1").parent("td").prev("td").find("div.tx_field_title").text("首剂(mg)");
         $("#knj_col2").parent("td").prev("td").find("div.tx_field_title").text("维持(mg/h)");
         $("#knj_col3").parent("td").prev("td").find("div.tx_field_title").text("总量(mg)");
         
         $("#knj_col1").html("<input type='text' class='print_input input-sm form-control'  name='tx_sj' value='' oninput='calc_tx_zl();' /> ");
         $("#knj_col2").html("<input type='text' class='print_input input-sm form-control'  name='tx_weichi' value='' oninput='calc_tx_zl();' /> ");
         $("#knj_col3").html("<input type='text' class='print_input input-sm form-control'  name='tx_zl' value='' /> ");
        break;
       case "枸橼酸钠":
         //枸橼酸钠
         $("#knj_col1").parent("td").prev("td").find("div.tx_field_title").text("维持(ml/h)");
         $("#knj_col2").parent("td").prev("td").find("div.tx_field_title").text("钙名称");
         $("#knj_col3").parent("td").prev("td").find("div.tx_field_title").text("钙剂量(ml/h)");
         
         $("#knj_col1").html("<input type='text' class='print_input input-sm form-control'  name='tx_weichi' value=''  /> ");
         $("#knj_col2").html("<input type='text' class='print_input input-sm form-control'  name='tx_gai_mingcheng' value='' />");
         $("#knj_col3").html("<input type='text' class='print_input input-sm form-control'  name='tx_gai_jiliang' value=''  /> ");
        break;
        default:
         //低分子肝素
         $("#knj_col1").parent("td").prev("td").find("div.tx_field_title").text("首剂(Iu)");
         $("#knj_col2").parent("td").prev("td").find("div.tx_field_title").text("维持(Iu)");
         $("#knj_col3").parent("td").prev("td").find("div.tx_field_title").text("总量(Iu)");
         
         $("#knj_col1").html("<input type='text' class='print_input input-sm form-control'  name='tx_sj' value=''  oninput='calc_tx_zl();'  /> ");
         $("#knj_col2").html("<input type='text' class='print_input input-sm form-control'  name='tx_weichi' value='' oninput='calc_tx_zl();' /> ");
         $("#knj_col3").html("<input type='text' class='print_input input-sm form-control'  name='tx_zl' value=''  /> ");
        break;
      }  
    }
   
   //透析方式初始化
   function txfsChange(){
        var txfs=$("#tx_txfs_id option:selected").val(); 
         switch(txfs){
          //HD
         case "HD":
          $("input[name='tx_zhzl']").attr("readonly","readonly").val("/");
          $("select[name='tx_zhfs']").attr("disabled","disabled");
          $("select[name='tx_xlq_id']").attr("disabled","disabled").val("");
          $("select[name='tx_glq_id']").attr("disabled","disabled").val("");
        
          //监测记录
          $("input[name=tx_jcjl_zhl]").attr("readonly","readonly").val("/");
          $("input[name=tx_jcjl_zhliang]").attr("readonly","readonly").val("/");
         break;
        //HDF 
        case "HDF":
          $("select[name='tx_xtq_id']").attr("disabled","disabled").val("");
          $("select[name='tx_glq_id']").attr("disabled","disabled").val("");
          
          //监测记录
        break;
         //HD+HP
        case "HD+HP":
          $("input[name='tx_zhzl']").attr("readonly","readonly").val("/");
          $("select[name='tx_zhfs']").attr("disabled","disabled");
          $("select[name='tx_xlq_id']").attr("disabled","disabled").val("");           
        break; 
        //HP
        case "HP":
         $("input[name='tx_zhzl']").attr("readonly","readonly").val("/");
         $("select[name='tx_zhfs']").attr("disabled","disabled");
         $("select[name='tx_xtq_id']").attr("disabled","disabled").val("");
         $("select[name='tx_xlq_id']").attr("disabled","disabled").val(""); 
         
         $("input[name=tx_txycf_jia]").attr("readonly","readonly").val("/");
         $("input[name=tx_txycf_na]").attr("readonly","readonly").val("/");
         $("input[name=tx_txycf_gai]").attr("readonly","readonly").val("/");
         $("input[name=tx_txycf_tsqg]").attr("readonly","readonly").val("/");
         $("input[name=tx_txyll]").attr("readonly","readonly").val("/");
        break;
        //HF
        case "HF":
         $("select[name='tx_xtq_id']").attr("disabled","disabled").val("");
         $("select[name='tx_glq_id']").attr("disabled","disabled").val(""); 
         $("input[name=tx_txyll]").attr("readonly","readonly").val("/");
        break;
         
        case "SCUF":
         $("input[name='tx_zhzl']").attr("readonly","readonly").val("/");
         $("select[name='tx_zhfs']").attr("disabled","disabled");
         $("select[name='tx_xlq_id']").attr("disabled","disabled").val("");
         $("select[name='tx_glq_id']").attr("disabled","disabled").val("");
       
         $("input[name=tx_txycf_jia]").attr("readonly","readonly").val("/");
         $("input[name=tx_txycf_na]").attr("readonly","readonly").val("/");
         $("input[name=tx_txycf_gai]").attr("readonly","readonly").val("/");
         $("input[name=tx_txycf_tsqg]").attr("readonly","readonly").val("/");
         $("input[name=tx_txyll]").attr("readonly","readonly").val("/");
        break;
        
       case "IUF":
         $("input[name='tx_zhzl']").attr("readonly","readonly").val("/");
         $("select[name='tx_zhfs']").attr("disabled","disabled");
         $("select[name='tx_xlq_id']").attr("disabled","disabled").val("");
         $("select[name='tx_glq_id']").attr("disabled","disabled").val("");
         
         $("input[name=tx_txycf_jia]").attr("readonly","readonly").val("/");
         $("input[name=tx_txycf_na]").attr("readonly","readonly").val("/");
         $("input[name=tx_txycf_gai]").attr("readonly","readonly").val("/");
         $("input[name=tx_txycf_tsqg]").attr("readonly","readonly").val("/");
         $("input[name=tx_txyll]").attr("readonly","readonly").val("/");
        break;
        
        case "HFHD":
         $("input[name='tx_zhzl']").attr("readonly","readonly").val("/");
         $("select[name='tx_zhfs']").attr("disabled","disabled");
         $("select[name='tx_xlq_id']").attr("disabled","disabled").val("");
         $("select[name='tx_glq_id']").attr("disabled","disabled").val("");
        break;
        
        case "HFHD+HP":
         $("input[name='tx_zhzl']").attr("readonly","readonly").val("/");
         $("select[name='tx_zhfs']").attr("disabled","disabled");
         $("select[name='tx_xlq_id']").attr("disabled","disabled").val("");
          
          //监测记录
         $("input[name=tx_jcjl_zhl]").attr("readonly","readonly").val("/");
         $("input[name=tx_jcjl_zhliang]").attr("readonly","readonly").val("/");
        break;
        
        case "PHF":
          $("select[name='tx_xtq_id']").attr("disabled","disabled").val("");
          $("select[name='tx_glq_id']").attr("disabled","disabled").val("");
          
          //监测记录
        break;
        case "HFR":
          $("select[name='tx_xtq_id']").attr("disabled","disabled").val("");
          $("select[name='tx_zhfs']").attr("disabled","disabled");
          
          //监测记录
        break; 
       case "HDF+HP":
          $("select[name='tx_xtq_id']").attr("disabled","disabled").val("");
          
          //监测记录
        break;  
       case "腹水回输":
         $("input[name='tx_zhzl']").attr("readonly","readonly").val("/");
         $("select[name='tx_zhfs']").attr("disabled","disabled");
         $("select[name='tx_glq_id']").attr("disabled","disabled").val("");
         $("select[name='tx_xlq_id']").attr("disabled","disabled").val(""); 
         
         $("input[name=tx_txycf_jia]").attr("readonly","readonly").val("/");
         $("input[name=tx_txycf_na]").attr("readonly","readonly").val("/");
         $("input[name=tx_txycf_gai]").attr("readonly","readonly").val("/");
         $("input[name=tx_txycf_tsqg]").attr("readonly","readonly").val("/");
         $("input[name=tx_txyll]").attr("readonly","readonly").val("/");
         break;
        //HDF 
       case "CRRT":
          $("select[name='tx_xtq_id']").attr("disabled","disabled").val("");
          $("select[name='tx_glq_id']").attr("disabled","disabled").val("");
          
          //监测记录
        break;  
       }
   }
   
    //透析方式切换
    function txfsChange1(){
        var txfs=$("#tx_txfs_id option:selected").val(); 
        var page_txfs='${txcf.tx_txfs_id}';//页面当前保存的透析方式
        var tx_number='${hzda.tx_number}';
        //如果切换到当前页面保存的透析方式，则根据选择的日期和当前患者来刷新页面
        if(txfs==page_txfs){
           var load_index=layer.load(2, {time: 5*1000});
           var rq=$("#tx_first_date").val();
           var tx_number=$("#tx_number").val();
		   if(tx_number==""||rq==""){return false;}
		   $("#tx_content").load("user/SearchhzinfoBytxrq.shtml?tx_number="+tx_number+"&tx_txdate="+rq,function(){
		     layer.close(load_index);
		   }); 
          return false; 
         }
         switch(txfs){
          //HD
         case "HD":
          $("input[name='tx_zhzl']").attr("readonly","readonly").val("/");
          $("select[name='tx_zhfs']").attr("disabled","disabled").val("");
          $("select[name='tx_xlq_id']").attr("disabled","disabled").val("");
          $("select[name='tx_glq_id']").attr("disabled","disabled").val("");
          $("select[name='tx_xtq_id']").removeAttr("disabled");
          
          $("input[name=tx_txycf_jia]").removeAttr("readonly").val("");
          $("input[name=tx_txycf_na]").removeAttr("readonly").val("");
          $("input[name=tx_txycf_gai]").removeAttr("readonly").val("");
          $("input[name=tx_txycf_tsqg]").removeAttr("readonly").val("");
          $("input[name=tx_txyll]").removeAttr("readonly").val("");
         break;
        //HDF 
        case "HDF":
         $("select[name='tx_xtq_id']").attr("disabled","disabled").val("");
         $("select[name='tx_glq_id']").attr("disabled","disabled").val("");
         $("select[name='tx_xlq_id']").removeAttr("disabled");
         $("input[name='tx_zhzl']").removeAttr("readonly").val("${txcf.tx_zhzl}");
         $("select[name='tx_zhfs']").removeAttr("disabled");
         $("select[name='tx_xlq_id']").removeAttr("disabled");
         
        
         $("input[name=tx_txycf_jia]").removeAttr("readonly").val("");
         $("input[name=tx_txycf_na]").removeAttr("readonly").val("");
         $("input[name=tx_txycf_gai]").removeAttr("readonly").val("");
         $("input[name=tx_txycf_tsqg]").removeAttr("readonly").val("");
         $("input[name=tx_txyll]").removeAttr("readonly").val("");
        break;
         //HD+HP
        case "HD+HP":
         $("input[name='tx_zhzl']").attr("readonly","readonly").val("/");
         $("select[name='tx_zhfs']").attr("disabled","disabled").val("");
         $("select[name='tx_xlq_id']").attr("disabled","disabled"); 
         $("select[name='tx_glq_id']").removeAttr("disabled");
         $("select[name='tx_xtq_id']").removeAttr("disabled");
         
         $("input[name=tx_txycf_jia]").removeAttr("readonly").val("");
         $("input[name=tx_txycf_na]").removeAttr("readonly").val("");
         $("input[name=tx_txycf_gai]").removeAttr("readonly").val("");
         $("input[name=tx_txycf_tsqg]").removeAttr("readonly").val("");
         $("input[name=tx_txyll]").removeAttr("readonly").val("");
        break; 
        //HP
        case "HP":
         $("input[name='tx_zhzl']").attr("readonly","readonly").val("/");
         $("select[name='tx_zhfs']").attr("disabled","disabled").val("");
         $("select[name='tx_xtq_id']").attr("disabled","disabled").val("");
         $("select[name='tx_xlq_id']").attr("disabled","disabled").val("");
         $("select[name='tx_glq_id']").removeAttr("disabled"); 
       
         $("input[name=tx_txycf_jia]").attr("readonly","readonly").val("/");
         $("input[name=tx_txycf_na]").attr("readonly","readonly").val("/");
         $("input[name=tx_txycf_gai]").attr("readonly","readonly").val("/");
         $("input[name=tx_txycf_tsqg]").attr("readonly","readonly").val("/");
         $("input[name=tx_txyll]").attr("readonly","readonly").val("/");
        break;
        //HF
        case "HF":
         $("select[name='tx_xtq_id']").attr("disabled","disabled").val("");
         $("select[name='tx_glq_id']").attr("disabled","disabled").val("");
         $("input[name='tx_zhzl']").removeAttr("readonly").val("${txcf.tx_zhzl}");
         $("select[name='tx_zhfs']").removeAttr("disabled");
         $("select[name='tx_xlq_id']").removeAttr("disabled");
          
         $("input[name=tx_txycf_jia]").removeAttr("readonly").val("");
         $("input[name=tx_txycf_na]").removeAttr("readonly").val("");
         $("input[name=tx_txycf_gai]").removeAttr("readonly").val("");
         $("input[name=tx_txycf_tsqg]").removeAttr("readonly").val("");
         $("input[name=tx_txyll]").attr("readonly","readonly").val("/");
        break;
         
        case "SCUF":
         $("input[name='tx_zhzl']").attr("readonly","readonly").val("/");
         $("select[name='tx_zhfs']").attr("disabled","disabled").val("");
         $("select[name='tx_xlq_id']").attr("disabled","disabled").val("");
         $("select[name='tx_glq_id']").attr("disabled","disabled").val("");
         $("select[name='tx_xtq_id']").removeAttr("disabled");
        
         $("input[name=tx_txycf_jia]").attr("readonly","readonly").val("/");
         $("input[name=tx_txycf_na]").attr("readonly","readonly").val("/");
         $("input[name=tx_txycf_gai]").attr("readonly","readonly").val("/");
         $("input[name=tx_txycf_tsqg]").attr("readonly","readonly").val("/");
         $("input[name=tx_txyll]").attr("readonly","readonly").val("/");
        break;
        
       case "IUF":
         $("input[name='tx_zhzl']").attr("readonly","readonly").val("/");
         $("select[name='tx_zhfs']").attr("disabled","disabled").val("");
         $("select[name='tx_xlq_id']").attr("disabled","disabled").val("");
         $("select[name='tx_glq_id']").attr("disabled","disabled").val("");
         $("select[name='tx_xtq_id']").removeAttr("disabled");
         
         $("input[name=tx_txycf_jia]").attr("readonly","readonly").val("/");
         $("input[name=tx_txycf_na]").attr("readonly","readonly").val("/");
         $("input[name=tx_txycf_gai]").attr("readonly","readonly").val("/");
         $("input[name=tx_txycf_tsqg]").attr("readonly","readonly").val("/");
         $("input[name=tx_txyll]").attr("readonly","readonly").val("/");
        break;
        
        case "HFHD":
         $("input[name='tx_zhzl']").attr("readonly","readonly").val("/");
         $("select[name='tx_zhfs']").attr("disabled","disabled").val("");
         $("select[name='tx_xlq_id']").attr("disabled","disabled").val("");
         $("select[name='tx_glq_id']").attr("disabled","disabled").val("");
         $("select[name='tx_xtq_id']").removeAttr("disabled");
         
         $("input[name=tx_txycf_jia]").removeAttr("readonly").val("");
         $("input[name=tx_txycf_na]").removeAttr("readonly").val("");
         $("input[name=tx_txycf_gai]").removeAttr("readonly").val("");
         $("input[name=tx_txycf_tsqg]").removeAttr("readonly").val("");
         $("input[name=tx_txyll]").removeAttr("readonly").val("");
        break;
        
        case "HFHD+HP":
         $("input[name='tx_zhzl']").attr("readonly","readonly").val("/");
         $("select[name='tx_zhfs']").attr("disabled","disabled").val("");
         $("select[name='tx_xlq_id']").attr("disabled","disabled").val("");
         $("select[name='tx_glq_id']").removeAttr("disabled");
         $("select[name='tx_xtq_id']").removeAttr("disabled");
         
         $("input[name=tx_txycf_jia]").removeAttr("readonly").val("");
         $("input[name=tx_txycf_na]").removeAttr("readonly").val("");
         $("input[name=tx_txycf_gai]").removeAttr("readonly").val("");
         $("input[name=tx_txycf_tsqg]").removeAttr("readonly").val("");
         $("input[name=tx_txyll]").removeAttr("readonly").val("");
        break;
        
        case "PHF":
         $("select[name='tx_xtq_id']").attr("disabled","disabled").val("");
         $("select[name='tx_glq_id']").attr("disabled","disabled").val("");
         $("select[name='tx_xlq_id']").removeAttr("disabled");
         $("input[name='tx_zhzl']").removeAttr("readonly").val("${txcf.tx_zhzl}");
         $("select[name='tx_zhfs']").removeAttr("disabled");
         $("select[name='tx_xlq_id']").removeAttr("disabled");
        
         $("input[name=tx_txycf_jia]").removeAttr("readonly").val("");
         $("input[name=tx_txycf_na]").removeAttr("readonly").val("");
         $("input[name=tx_txycf_gai]").removeAttr("readonly").val("");
         $("input[name=tx_txycf_tsqg]").removeAttr("readonly").val("");
         $("input[name=tx_txyll]").removeAttr("readonly").val("");
        break; 
        
        case "HFR":
         $("select[name='tx_xtq_id']").attr("disabled","disabled").val("");
         $("select[name='tx_glq_id']").removeAttr("disabled");
         $("input[name='tx_zhzl']").removeAttr("readonly").val("${txcf.tx_zhzl}");
         $("select[name='tx_xlq_id']").removeAttr("disabled");
         $("select[name='tx_zhfs']").attr("disabled","disabled").val("");
         $("select[name='tx_xlq_id']").removeAttr("disabled");
         
         $("input[name=tx_txycf_jia]").removeAttr("readonly").val("");
         $("input[name=tx_txycf_na]").removeAttr("readonly").val("");
         $("input[name=tx_txycf_gai]").removeAttr("readonly").val("");
         $("input[name=tx_txycf_tsqg]").removeAttr("readonly").val("");
         $("input[name=tx_txyll]").removeAttr("readonly").val("");
        break;
        
        case "HDF+HP":
         $("select[name='tx_xtq_id']").attr("disabled","disabled").val("");
         $("select[name='tx_glq_id']").removeAttr("disabled");
         $("select[name='tx_xlq_id']").removeAttr("disabled");
         $("input[name='tx_zhzl']").removeAttr("readonly").val("${txcf.tx_zhzl}");
         $("select[name='tx_zhfs']").removeAttr("disabled");
         $("select[name='tx_xlq_id']").removeAttr("disabled");
         
        
         $("input[name=tx_txycf_jia]").removeAttr("readonly").val("");
         $("input[name=tx_txycf_na]").removeAttr("readonly").val("");
         $("input[name=tx_txycf_gai]").removeAttr("readonly").val("");
         $("input[name=tx_txycf_tsqg]").removeAttr("readonly").val("");
         $("input[name=tx_txyll]").removeAttr("readonly").val("");
        break; 
        
       case "腹水回输":
          $("input[name='tx_zhzl']").attr("readonly","readonly").val("/");
          $("select[name='tx_zhfs']").attr("disabled","disabled").val("");
          $("select[name='tx_xlq_id']").attr("disabled","disabled").val("");
          $("select[name='tx_glq_id']").attr("disabled","disabled").val("");
          $("select[name='tx_xtq_id']").removeAttr("disabled");
          
          $("input[name=tx_txycf_jia]").removeAttr("readonly").val("");
          $("input[name=tx_txycf_na]").removeAttr("readonly").val("");
          $("input[name=tx_txycf_gai]").removeAttr("readonly").val("");
          $("input[name=tx_txycf_tsqg]").removeAttr("readonly").val("");
          $("input[name=tx_txyll]").removeAttr("readonly").val("");
         break;
         
        case "CRRT":
         $("select[name='tx_xtq_id']").attr("disabled","disabled").val("");
         $("select[name='tx_glq_id']").attr("disabled","disabled").val("");
         $("select[name='tx_xlq_id']").removeAttr("disabled");
         $("input[name='tx_zhzl']").removeAttr("readonly").val("${txcf.tx_zhzl}");
         $("select[name='tx_zhfs']").removeAttr("disabled");
         $("select[name='tx_xlq_id']").removeAttr("disabled");
         
         $("input[name=tx_txycf_jia]").removeAttr("readonly").val("");
         $("input[name=tx_txycf_na]").removeAttr("readonly").val("");
         $("input[name=tx_txycf_gai]").removeAttr("readonly").val("");
         $("input[name=tx_txycf_tsqg]").removeAttr("readonly").val("");
         $("input[name=tx_txyll]").removeAttr("readonly").val("");
        break;      
       }
   }
   
   //透析方式切换
   $("#tx_txfs_id").change(function(){
      txfsChange1();
   });
   
   
   //透析处方--抗凝剂切换规则
   $("#tx_knj").change(function(){
      knjChange();
   });
   //打印默认，打印日期默认为当前排班日期 20170221
   $("#print_default").click(function(){
      var numbers = $("input[name=patientcheck]:checked").serialize();
      if(numbers.length<=0){layer.msg("请勾选打印患者！");return false;}
      var basePath=$("base").attr("href");
      var tx_time=$("input[name='tx_first_date']").val();
      if("${param.tx_no}"!=""){
         window.open(basePath+"user/getjiatoutxform.shtml?tx_time="+tx_time+"&"+numbers.replace(new RegExp("patientcheck","g"),"tx_number"));
      }else{
         window.open(basePath+"user/gettxform.shtml?tx_time="+tx_time+"&"+numbers.replace(new RegExp("patientcheck","g"),"tx_number"));
      }
  });
  
   //开始透析
   var begintxpage=null;
   var confirmtxpage=null;
   function begintx(){
      if(""==$("input[name='pbflag']").val()){layer.msg("当前患者没有排班！");return false;}
      var tx_number=$("#tx_number").val();
      var rq=getNowymdDate();
      var txcfflag=$("#txcf_form").find("span.head_confirm_status").text();
      if("未确认"==txcfflag){
          confirmtxpage=layer.confirm('透析处方未确认，确定开始透析吗？', {
		    btn: ['确定','取消'],title:'温馨提示',closeBtn: 0,anim: 2,shadeClose: true,skin:'layui-layer-mtxform'
			}, function(){
			   //开始透析
			   begintxpage=layer.open({
					title : "开始透析",
					type : 2,
					skin : 'layui-layer-txform',
					area : [ "528px", "620px" ],
					closeBtn : 0,
					shadeClose: true,
					content :'user/txfrom_begin.shtml?tx_number='+tx_number+'&tx_time='+rq
		       });    
			}, function(){
			   layer.close(confirmtxpage);
		 });
      }else{
           begintxpage=layer.open({
				title : "开始透析",
				type : 2,
				skin : 'layui-layer-txform',
				area : [ "528px", "620px" ],
				closeBtn : 0,
				shadeClose: true,
				content :'user/txfrom_begin.shtml?tx_number='+tx_number+'&tx_time='+rq
	       });  
      }
   }
   
   //结束透析
   var endtxpage=null;
   function endtx(){
      if(""==$("input[name='pbflag']").val()){layer.msg("当前患者没有排班！");return false;}
      if("未确认"==$("#txcf_form").find("span.head_confirm_status").text()){ layer.msg("处方未确认，不可结束透析！");return false;}
      var tx_number=$("#tx_number").val();
      //var rq=getNowymdDate();
      var rq="${param.tx_txdate}";//有跨凌晨透析的患者
      endtxpage=layer.open({
				title : "结束透析",
				type : 2,
				skin : 'layui-layer-txform',
				area : [ "600px", "400px" ],
				closeBtn : 0,
				shadeClose: true,
				content :'user/txform_end.shtml?tx_number='+tx_number+'&tx_time='+rq+'&tx_zlxj_id=${txzlxj.tx_zlxj_id}'
	       }); 
   }
   
   
   //自查
   function reporttx(){
     var load_index=layer.load(2, {time: 5*1000});
     var tx_number=$("#tx_number").val();
     //var tx_time=getNowymdDate();
     var tx_time="${param.tx_txdate}";//有跨凌晨透析的患者
     $.post("txform/mtxform_txreport.shtml",{"tx_number":tx_number,"tx_time":tx_time},function(data,status){
           if(data.status!=""){
              if("0"==data.txpgq){$("tr.txreport_txq td:nth-child(2)").text("字段有空项")}else{$("tr.txreport_txq").addClass("hidden");}
              if("0"==data.txdbcheck){$("tr.txreport_dbcheck td:nth-child(2)").text("模块未确认")}else{$("tr.txreport_dbcheck").addClass("hidden");}
              if("1"==data.txjcjl){$("tr.txreport_jcjl td:nth-child(2)").text("字段有空项")}else{$("tr.txreport_jcjl").addClass("hidden");}
              if(0!=data.txlsyz){$("tr.txreport_lsyz td:nth-child(2)").text("当天有未执行的临时医嘱")}else{$("tr.txreport_lsyz").addClass("hidden");}
              if("0"==data.txpgh){$("tr.txreport_txh td:nth-child(2)").text("字段有空项")}else{$("tr.txreport_txh").addClass("hidden");}
              if("0"==data.txzlxj){$("tr.txreport_zlxj td:nth-child(2)").text("字段有空项")}else{$("tr.txreport_zlxj").addClass("hidden");}
              txreportpage=layer.open({
		        title:"自查模块提示",
			    type: 1,
			    closeBtn: 0,
			    anim: 2,
			    shadeClose: true,
			    skin:'layui-layer-mtxform',
			    area: ['400px', '400px'],
			    content: $('.txreport')
			 });
			 $("button.txreport_confirm_btn").attr("onclick","layer.close("+txreportpage+");")
           }else{
              //提示监测记录时间间隔
			 if("2"==data.txjcjl){
			    var confirm_index=layer.confirm('监测记录时间间隔大于1小时，是否完成自查？', {
			    btn: ['确定','取消'],title:'温馨提示',closeBtn: 0,anim: 2,shadeClose: true,skin:'layui-layer-mtxform'
				},function(){
				   $.post("${ctx}txform/mtxform_txreport_confirm.shtml",{"tx_number":tx_number,"tx_time":tx_time},function(data,status){
				       changetx_status(tx_number,"已自查");
				       if("success"==status){
				           $("#txform_check_btn").text("已自查").css({"background-color":"#AFB3B5","border-color":"#AFB3B5"});
				           if("0"=="${userinfo.USER_PERMISSION}"){
				             $("div.tx_process_btn").append("<div class='print_div'> <button type='button' id='txform_archving_btn' class='btn btn-info' style='background-color:#ff3b30;border-color:#ff3b30;' onclick='tx_archiving();' >审核归档</button> </div>");
				           }
			               layer.msg("自查成功！");
			           }else{ layer.msg("自查出错，请重试！");}
					});
				}, function(){
				   layer.close(confirm_index);
			    });
			 }else{
			     //直接上报
		         $.post("${ctx}txform/mtxform_txreport_confirm.shtml",{"tx_number":tx_number,"tx_time":tx_time},function(data,status){
		           changetx_status(tx_number,"已自查");
			       if("success"==status){
				       $("#txform_check_btn").text("已自查").css({"background-color":"#AFB3B5","border-color":"#AFB3B5"});
				       if("0"=="${userinfo.USER_PERMISSION}"){
				         $("div.tx_process_btn").append("<div class='print_div'> <button type='button' id='txform_archving_btn' class='btn btn-info' style='background-color:#ff3b30;border-color:#ff3b30;' onclick='tx_archiving();' >审核归档</button> </div>");
		               }
		               layer.msg("自查成功！");
		           }else{ layer.msg("自查出错，请重试！");}
				 });
			 }
          }
     }).complete(function(){layer.close(load_index);});
   }
   
   //保存透析处方 
    var tx_zl_doctor_index=0;
    $(".save_hztcxf_txform").click(function(){
    //判断用户权限
    if('${userinfo.USER_PERMISSION}'=='3'||'${userinfo.USER_PERMISSION}'=='4'){
       layer.msg("当前用户没有权限操作处方！");
       return false;
     } 
    //判断处方是否填写完整
    var flag=1;
    $("#txcf_form").find("input,select").each(function(index){
        if($(this).val()==""&&$(this).attr("type")!="hidden"&&"txcf_txjx"!=$(this).attr("name")&&"tx_mubiao_ts"!=$(this).attr("name")&&"disabled"!=$(this).attr("disabled")){
           layer.alert("处方不能有空字段。\n请将字段【"+$(this).parents("td").prev("td").find("div.tx_field_title").text()+"】填写完整！");
           flag=0;return false;
        }
     }); 
     if(flag==1){
        var tx_zl_doctor_confirm=0;
        //判断是否已确认
        if("已确认"==$(this).prev("span").text()){
             var confirm_index=layer.confirm('透析处方已确认，确定再次修改吗？', {
			  btn: ['确定','取消'],title:'温馨提示'
				}, function(){
				  gettx_zl_doctor();
		          layer.close(confirm_index);
				}, function(){
				   layer.close(confirm_index);return false;
			});
        }else{
             gettx_zl_doctor();
        }
      } 
   });
   
   $(".tx_zl_doctor_confirm").click(function(){
      $("input[name=tx_zl_doctor]").val($(".tx_zl_doctor_select option:selected").text());
      $("input[name=tx_zl_doctor_id]").val($(".tx_zl_doctor_select option:selected").val());
       mtxform_hztxcf_save();
   });
   $(".tx_zl_doctor_cancel").click(function(){
      layer.close(tx_zl_doctor_index);
   });  
   
   function gettx_zl_doctor(){
      $.post("txform/dic.shtml",{dictype:"tx_ys"},function(data){
	     $(".tx_zl_doctor_select").empty();
	     //默认当前医生
	     $.each(data.dic,function(index,item){
	        if(${userinfo.USER_PERMISSION==1||userinfo.USER_PERMISSION==2}&&item.dicname=="${userinfo.USER_NAME}"){
	          $(".tx_zl_doctor_select").append("<option value="+item.dicid+" selected='selected'>"+item.dicname+"</option>");
	        }else{
	          $(".tx_zl_doctor_select").append("<option value="+item.dicid+">"+item.dicname+"</option>");
	        }
	     });
	  }); 
	  tx_zl_doctor_index=layer.open({
        type: 1,
		title: '确认处方',
		closeBtn: 0,
		anim: 2,
		shadeClose: true,
		skin:'layui-layer-txform',
		area: ['400px', '200px'],
		content: $('.tx_zl_doctor') 
      });
   }
   
   var txyzpushpage=null;
   function mtxform_hztxcf_save(){
        var load_index=layer.load(2, {time: 5*1000});
        var tx_number=$("#tx_number").val();
        var rq=$("input[name='tx_first_date']").val();
	    var form_data= $("#txcf_form").serializeArray();
	    $.ajax({
	         type:"post",
	         data:form_data,
	         url:"txform/mtxform_hztxcf_save.shtml",
	         dataType:"json",
	         beforeSend:function(){
              $("button.save_hztcxf_txform").attr("disabled","disabled");
             },
	         success:function(data,status){
	           if(data.pushyznum>0&&"未确认"==parent.$("#txcf_form").find("span.head_confirm_status").text()&&rq==getNowymdDate()){
	             txyzpushpage=layer.open({
						title : "医嘱推送",
						type : 2,
						skin : 'layui-layer-txform',
						area : [ "500px", "95%" ],
						closeBtn : 0,
						content :'user/yzpushpage.shtml?tx_number='+tx_number+'&rq='+rq
			      }); 
	           }else{
	             if(data['status']==""){
	                 $("#tx_content").load("user/SearchhzinfoBytxrq.shtml?tx_number="+tx_number+"&tx_txdate="+rq,function(response, status, xhr){
	                   if (status=="error") {layer.msg("保存出错："+ xhr.status + " " + xhr.statusText)}else{
	                      layer.msg("数据保存成功！");
	                   }
	                 });
		          }else{
		             layer.alert(data['status']);
		          }
	           }
	          },error:function(){
	            layer.msg("保存数据出错！");
	          },complete:function(){
	            $("#user_body").find("input[name=patientcheck][value="+tx_number+"]").parents("tr").children("td:nth-child(3)").find("span").removeClass("tx_txcf_tips");//更新处方状态表示
	            $("button.save_hztcxf_txform").removeAttr("disabled");
	            layer.close(load_index);
	            layer.close(tx_zl_doctor_index);
	          }
	    });
   }
   
   
   //保存透前评估
     $("button.mtxform_hztqpg_save").click(function(){
     if(""==$("input[name=tx_tqtz]").val()){
        layer.msg("请填写患者透前体重！");return false;
     }
     var load_index=layer.load(2, {time: 5*1000});
     var tx_number=$("#tx_number").val();
     var rq=$("input[name='tx_first_date']").val();
     var form_data= $("#txq_pg_form").serializeArray();
     $.ajax({
         type:"post",
         data:form_data,
         url:"txform/mtxform_hztqpg_save.shtml",
         dataType:"json",
         beforeSend:function(){
            $("button.mtxform_hztqpg_save").attr("disabled","disabled");
         },
         success:function(data,status){
           if(data['status']==""){
               $("#tx_content").load("user/SearchhzinfoBytxrq.shtml?tx_number="+tx_number+"&tx_txdate="+rq,function(response, status, xhr){
                   if (status=="error") {layer.msg("保存出错："+ xhr.status + " " + xhr.statusText)}else{
                      layer.msg("数据保存成功！");
                   }
                });
            }else{layer.alert(data['status']);} 
          },error:function(){
            layer.msg("保存数据出错！");
          },complete:function(){
            $("button.mtxform_hztqpg_save").removeAttr("disabled");
            layer.close(load_index);
          }
        });
     var t=floatObj.subtract($("input[name='tx_tqtz']").val(),$("input[name='tx_gtz']").val());
     $.post("${ctx}txform/updatetx_txcf_mbtsl.shtml",{"tx_number":"${tx_number}","tx_txdate":rq,"res":isNaN(t)?"":t});
  });
  
    //透前 称重方式下拉框变化
   function tq_czfsChange(e){
       var t=$("#txq_czfs option:selected").text();
	   if("卧床"==t){
		    $("input[name='tx_tqtz']").val("卧床").attr("readonly","readonly");
	        $("#tx_weight_add").val("不详").attr("readonly","readonly");
		  }
	   if("正常"==t){
		    $("input[name='tx_tqtz']").removeAttr("readonly").val("");
	        $("input[name='tx_tzzj']").removeAttr("readonly").val("");
		  } 
	   if("拒测"==t){
		    $("input[name='tx_tqtz']").val("拒测").attr("readonly","readonly");
	        $("#tx_weight_add").val("不详").attr("readonly","readonly");
		 }	  
   }
   
  //内瘘、导管默认值
  function nl_dg(){
    var st=$("#txq_pg_form").find("span.head_confirm_status").text();
    if("未确认"==st){
       if(''=='${txcf.tx_xgtl_id}'){
	       $("input[name='nl_name']").val("正常");
	       $("input[name='dg_name']").val("/");
	    }
	    if('${txcf.tx_xgtl_id}'.indexOf("内瘘")>-1){
	       $("input[name='nl_name']").val("正常");
	       $("input[name='dg_name']").val("/");
	    }else{
	       $("input[name='nl_name']").val("/");
	    }
	    if('${txcf.tx_xgtl_id}'.indexOf("导管")>-1){
	       $("input[name='nl_name']").val("/");
	       $("input[name='dg_name']").val("正常");
	    }else{
	       $("input[name='dg_name']").val("/");
	    }
    }
  }
   //计算超滤总量
  function clac_tx_clzl(){
   var st=$("#txq_pg_form").find("span.head_confirm_status").text();
     var tx_yztsl=$("input[name='tx_yztsl']").val()==""?0:$("input[name='tx_yztsl']").val();
     var tx_txcf_cftsl=$("input[name='tx_jcll']").val();
     //判断处方脱水量是否为负数
      if(""==tx_txcf_cftsl){
       $("input[name='tx_clzl']").val("");
      }else{
       if(tx_txcf_cftsl<0){
        $("input[name='tx_clzl']").val(isNaN(floatObj.subtract(tx_yztsl,Math.abs(tx_txcf_cftsl)))?"":floatObj.subtract(tx_yztsl,Math.abs(tx_txcf_cftsl))); 
       }else{
        $("input[name='tx_clzl']").val(isNaN(floatObj.add(tx_yztsl,tx_txcf_cftsl))?"":floatObj.add(tx_yztsl,tx_txcf_cftsl)); 
       }
      }
  }  
  //计算体重增加
  function calc_tx_tzzj(){
     var tx_tqtz=$("input[name='tx_tqtz']").val();
     var tx_qctxhtz=$("input[name='tx_qctxhtz']").val();
     if(tx_qctxhtz!=""&&tx_qctxhtz!="/"){
        $("input[name='tx_tzzj']").val(isNaN(floatObj.subtract(tx_tqtz,tx_qctxhtz))?"不详":floatObj.subtract(tx_tqtz,tx_qctxhtz));
        if(tx_tqtz.trim().length==0){$("input[name='tx_tzzj']").val("");} 
     }
  }
   
   
  //保存双人核对
   $("button.save_double_check_txform").click(function(){
     if($("input[name='tx_touXiWuPin_indicator']:checked").val()=="整改"&&$("input[name=tx_touXiWuPin_error]").val()==""){layer.msg("请输入透析物品整改值！");return false;}
	 if($("input[name='tx_touXiCanShu_indicator']:checked").val()=="整改"&&$("input[name=tx_touXiCanShu_error]").val()==""){layer.msg("请输入透析参数整改值！");return false;}
	 if($("input[name='tx_xueGuanTongLu_indicator']:checked").val()=="整改"&&$("input[name=tx_xueGuanTongLu_error]").val()==""){layer.msg("请输入血管通路整改值！");return false;}
	 if($("input[name='tx_guanDao_indicator']:checked").val()=="整改"&&$("input[name=tx_guanDao_error]").val()==""){layer.msg("请输入管道连接整改值！");return false;}
	 if(""==$("#tx_doublecheck_form").find("select[name='tx_hd_nurse']").val()){layer.msg("核对护士不能为空！");return false;}
	 $("input[name='tx_hd_nurse_id'][type='hidden']").val($("#tx_double_tx_hd_nurse option:selected").attr("data-id"));
     var load_index=layer.load(2, {time: 5*1000});
     var tx_number=$("#tx_number").val();
     var rq=$("input[name='tx_first_date']").val();
     var form_data= $("#tx_doublecheck_form").serializeArray();
     $.ajax({
         type:"post",
         data:form_data,
         url:"txform/mtxform_doublecheck_save.shtml",
         dataType:"json",
         beforeSend:function(){
            $("button.save_double_check_txform").attr("disabled","disabled");
         },
         success:function(data,status){
          if(data['status']==""){
               $("#tx_content").load("user/SearchhzinfoBytxrq.shtml?tx_number="+tx_number+"&tx_txdate="+rq,function(response, status, xhr){
                   if (status=="error") {layer.msg("保存出错："+ xhr.status + " " + xhr.statusText)}else{
                      layer.msg("数据保存成功！");
                   }
               }); 
            }else{layer.alert(data['status']);}
          },error:function(){
            layer.msg("保存数据出错！");
          },complete:function(){
            $("button.save_double_check_txform").removeAttr("disabled");
            layer.close(load_index);
          }
       });   
   });
   //初始化双人核对
   function initdbcheck(){
      $("input[name='tx_touXiWuPin_indicator'][value='"+(${empty dbcheck.tx_touXiWuPin_error}?"正确":"整改")+"']").attr("checked","checked");
      $("input[name='tx_touXiCanShu_indicator'][value='"+(${empty dbcheck.tx_touXiCanShu_error}?"正确":"整改")+"']").attr("checked","checked");
      $("input[name='tx_xueGuanTongLu_indicator'][value='"+(${empty dbcheck.tx_xueGuanTongLu_error}?"正确":"整改")+"']").attr("checked","checked");
      $("input[name='tx_guanDao_indicator'][value='"+(${empty dbcheck.tx_guanDao_error}?"正确":"整改")+"']").attr("checked","checked");
   }
 
 
   //监测记录确认
   function txjcjlconfirm(){
      var tx_pb_date=$("input[name='tx_first_date']").val();
      //if(tx_pb_date!=getNowymdDate()&&"${userinfo.USER_PERMISSION}"!="0"){layer.msg("不能确认当前日期数据！");return false;}
      var tx_status=parseInt($("input[name='tx_status']").val());
      if(tx_status<2||isNaN(tx_status)){ layer.msg("开始透析后才能确认！");return false;}
      var tx_number=$("#tx_number").val();
      $.post("txform/mtxform_updatejcjlstatus.shtml",{tx_number:tx_number,tx_time:tx_pb_date},function(data){
          if(data['status']==""){layer.msg("确认成功");$("#tx_jcjl_form").find("span.head_confirm_status").addClass("head_confirmed").text("已确认");}else{
            layer.msg("确认出错，请稍后重试！");
          }
      });  
   }
   
   //获取患者的监测记录列表
   function gethzjcjl(){
      var tx_number=$("#tx_number").val();
      var tx_pb_date="${param.tx_txdate}";
      //加透患者的逻辑
      var url="user/getjcjllistBytxnumber.shtml";var tx_no="";
      if("${param.tx_no}"!=""){
         tx_no="${param.tx_no}";
         url="user/getjiatoujcjllistBytxnumber.shtml";
      }
      $.post(url,{tx_number:tx_number,tx_time:tx_pb_date,tx_no:tx_no},function(data){
        //if(data.res.length==0){return false;}
        $("#tx_jcjl_table_thbody").empty();
        var fstr=null;
        $.each(data.res,function(y,v){ 
		   fstr=""       
           if(v.tx_flag=="0"&&v.tx_status=="1"){$("#tx_jcjl_form").find("span.head_confirm_status").addClass("head_confirmed").text("已确认");}
           if(v.tx_flag=="0"){fstr="<div class='tx_start_arrow tx_flag_position'></div><span class='tx_flag_position word_white'>S</span>"}
           if(v.tx_flag=="1"){fstr="<div class='tx_end_arrow tx_flag_position'></div><span class='tx_flag_position word_white'>E</span>"}
           $("#tx_jcjl_table tbody").append(
			   "<tr data-id="+v.tx_jcjl_id+" data-jcjlymd="+v.t_diff+"><td>"+fstr+"<div class='tx_common_field'>"+(v.tx_jcjl_time==null?"":v.tx_jcjl_time)+"</div></td>"
   			   +"<td><div class='tx_common_field'>"+(v.tx_jcjl_mb==null?"":v.tx_jcjl_mb)+"</div></td> <td><div class='tx_common_field'>"+(v.tx_jcjl_hx==null?"":v.tx_jcjl_hx)+"</div></td>"
			   +"<td><div class='tx_common_field'>"+(v.tx_jcjl_xy==null?"":v.tx_jcjl_xy)+"</div></td> <td><div class='tx_common_field'>"+(v.tx_jcjl_xy1==null?"":v.tx_jcjl_xy1)+"</div></td>"
			   +"<td><div class='tx_common_field'>"+(v.tx_jcjl_xll==null?"":v.tx_jcjl_xll)+"</div></td>"
			   +"<td><div class='tx_common_field'>"+(v.tx_jcjl_my==null?"":v.tx_jcjl_my)+"</div></td>  <td><div class='tx_common_field'>"+(v.tx_jcjl_kmy==null?"":v.tx_jcjl_kmy)+"</div></td>"
			   +"<td><div class='tx_common_field'>"+(v.tx_jcjl_cll==null?"":v.tx_jcjl_cll)+"</div></td> <td><div class='tx_common_field'>"+(v.tx_jcjl_clliang==null?"":v.tx_jcjl_clliang)+"</div></td>"
			   +"<td><div class='tx_common_field'>"+(v.tx_jcjl_nnd==null?"":v.tx_jcjl_nnd)+"</div></td> <td><div class='tx_common_field'>"+(v.tx_jcjl_txywd==null?"":v.tx_jcjl_txywd)+"</div></td>"
			   +"<td><div class='tx_common_field'>"+(v.tx_jcjl_zhl==null?"":v.tx_jcjl_zhl)+"</div></td> <td><div class='tx_common_field'>"+(v.tx_jcjl_zhliang==null?"":v.tx_jcjl_zhliang)+"</div></td>"
			   +"<td><div class='tx_common_field'>"+(v.tx_jcjl_zz==null?"":v.tx_jcjl_zz)+"</div></td> <td><div class='tx_common_field'>"+(v.tx_jcjl_cl==null?"":v.tx_jcjl_cl)+"</div></td> <td><div class='tx_common_field'>"+(v.tx_jcjl_jg==null?"":v.tx_jcjl_jg)+"</div></td>"
			   +"</tr>"       
           );
        });
        if(data.res.length<5){
           for(var i=0;i<5-data.res.length;i++){
             $("#tx_jcjl_table tbody").append(
               "<tr><td><div class='tx_common_field'>&nbsp;</div></td> <td><div class='tx_common_field'></div></td> <td><div class='tx_common_field'></div></td> <td><div class='tx_common_field'></div></td>"
               +"<td><div class='tx_common_field'></div></td> <td><div class='tx_common_field'></div></td> <td><div class='tx_common_field'></div></td> <td><div class='tx_common_field'></div></td>"
               +"<td><div class='tx_common_field'></div></td> <td><div class='tx_common_field'></div></td> <td><div class='tx_common_field'></div></td> <td><div class='tx_common_field'></div></td>"
               +"<td><div class='tx_common_field'></div></td> <td><div class='tx_common_field'></div></td> <td><div class='tx_common_field'></div></td> <td><div class='tx_common_field'></div></td>"
               +"<td><div class='tx_common_field'></div></td></tr>"
             );
           }
        }
        //实际治疗时长
        var confirm_st=$("#txh_pg_form").find("span.head_confirm_status").text();
        var start_time=$("#tx_jcjl_table_thbody").find("td").has("div.tx_start_arrow").parent("tr").attr("data-jcjlymd")+" "+$("#tx_jcjl_table_thbody").find("td").has("div.tx_start_arrow").children("div.tx_common_field").text();
        var end_time=$("#tx_jcjl_table_thbody").find("td").has("div.tx_end_arrow").parent("tr").attr("data-jcjlymd")+" "+$("#tx_jcjl_table_thbody").find("td").has("div.tx_end_arrow").children("div.tx_common_field").text(); 
        //var t=getNowymdDate();
        if("未确认"==confirm_st&&""!=start_time&&""!=end_time){
	          var diff=new Date(end_time).getTime()-new Date(start_time).getTime();
	          $("input[name='txh_sjsc_h']").val(isNaN(Math.floor(diff/(1000*3600)))?"":Math.floor(diff/(1000*3600)));
	          $("input[name='txh_sjsc_f']").val(isNaN((diff/60000)%60)?"":(diff/60000)%60);
	          //实际超虑量/置换量
	          $("input[name='txh_sjcll']").val($("#tx_jcjl_table_thbody").find("tr").has("div.tx_end_arrow").children("td:nth-child(10)").text());
	          $("input[name='txh_sjzhl']").val($("#tx_jcjl_table_thbody").find("tr").has("div.tx_end_arrow").children("td:nth-child(14)").text());
        }
      });
   }
   //绑定单击事件
   $("#tx_jcjl_table").on("click","tr",function(){
      var id=$(this).attr("data-id");
      if(typeof(id)=="undefined"||id==""){return false;} 
      $(this).addClass("dbtr_active").siblings().removeClass("dbtr_active");
   });
   //绑定双击事件
   var jcjldetailpage=null;
   $("#tx_jcjl_table").on("dblclick","tr",function(){
      //判断是否归档
      if(${tx_status.tx_status==5}){
        if('${userinfo.USER_PERMISSION}'!='0' && '${userinfo.USER_ID}'!=''){
           return false;
        }
      }
      if("${param.tx_no}"!=""){return false;}
      var id=$(this).attr("data-id");
      if(typeof(id)=="undefined"||id==""){return false;} 
      $(this).addClass("dbtr_active").siblings().removeClass("dbtr_active");
      var tx_number=$("#tx_number").val();
      var tx_pb_date=$("input[name='tx_first_date']").val();
      var tx_jcjl_ymd=$(this).attr("data-jcjlymd");//监测记录年月日
      var txfs=$("#tx_txfs_id").val();
          jcjldetailpage=layer.open({
			title : "监测记录",
			type : 2,
			skin : 'layui-layer-txform',
			area : [ "500px", "95%" ],
			closeBtn : 0,
			shadeClose: true,
			content :'user/hzjcjldetail.shtml?tx_number='+tx_number+'&tx_time='+tx_pb_date+'&txfs='+txfs+'&id='+id+'&tx_jcjl_ymd='+tx_jcjl_ymd
       }); 
   }); 
   
   //添加加测记录
   var addhzjcjlpage=null;
   function addhzjcjl(){
      var tx_number=$("#tx_number").val();
      var tx_pb_date=$("input[name='tx_first_date']").val();
      var tx_jcjl_ymd=getNowymdDate();//监测记录年月日
      var txfs=$("#tx_txfs_id").val();
          addhzjcjlpage=layer.open({
			title : "监测记录",
			type : 2,
			skin : 'layui-layer-txform',
			area : [ "500px", "95%" ],
			closeBtn : 0,
			content :'user/hzjcjldetail.shtml?tx_number='+tx_number+'&tx_time='+tx_pb_date+'&txfs='+txfs+'&id=&tx_jcjl_ymd='+tx_jcjl_ymd
       }); 
   } 
   //删除监测记录
   function delhzjcjl(){
      var $tr= $("#tx_jcjl_form").find("tr.dbtr_active");
      if($tr.children("td:first-child").text().indexOf("S")>=0){layer.msg("开始透析记录不可以删除！");return false;}
      if($tr.children("td:first-child").text().indexOf("E")>=0){layer.msg("结束透析记录不可以删除！");return false;} 
      var id=$tr.attr("data-id");
      if(typeof(id)=="undefined"||id==""){return false;} 
      layer.confirm("确认删除数据？",{btn:["确认","取消"]},
        function(e){
        $.ajax({
	      type:"post",
	      data:{"id":id},
	      url:"txform/delwebjcjl_ByID.shtml",
	      dataType:"json",        
	      success:function(data,status){
	          layer.msg("删除成功！");
	          gethzjcjl();
	       }
	     });   
      },function(e,index){
        layer.close(index);
      });  
   }
   
   //医嘱列表
   function gethzyzlist(){
      var tx_number=$("#tx_number").val();
      var tx_pb_date="${param.tx_txdate}";
      //加透患者的逻辑
      var url="user/gethzyzlist.shtml";var tx_no="";
      if("${param.tx_no}"!=""){
         tx_no="${param.tx_no}";
         url="user/getjiatouhzyzlist.shtml";
      }
      $.post(url,{tx_number:tx_number,tx_time:tx_pb_date,tx_no:tx_no},function(data){
        //if(data.res.length==0){return false;}
        $("#tx_lsyz_table_thbody").empty();
        var fstr=null;
        $.each(data.res,function(y,v){ 
          if(v.tx_is_child=="0"){
            $("#tx_lsyz_table_thbody").append(
			   "<tr data-id="+v.tx_lsyz_id+" data-zxsj="+(v.tx_lsyz_zxsj==null?"":v.tx_lsyz_zxsj)+"><td><div class='tx_common_field'>"+(v.tx_lsyz_kz_doctor==null?"":v.tx_lsyz_kz_doctor)+"</div></td> <td><div class='tx_common_field'>"+(v.tx_lsyz_kssj==null?"":v.tx_lsyz_kssj)+"</div></td>"
			   +"<td><div class='tx_common_field'>"+(v.tx_lsyz_yzcontent==null?"":v.tx_lsyz_yzcontent)+"</div></td>  <td><div class='tx_common_field'>"+(v.tx_lsyz_zxsj==null?"":v.tx_lsyz_zxsj)+"</div></td>"
			   +"<td><div class='tx_common_field'>"+(v.tx_lsyz_qm_nurse==null?"":v.tx_lsyz_qm_nurse)+"</div></td> <td><div class='tx_common_field'>"+(v.tx_lsyz_hd_nurse==null?"":v.tx_lsyz_hd_nurse)+"</div></td>"
			   +"</tr>"       
            );
          }else{
            $("#tx_lsyz_table_thbody").append(
			   "<tr data-id="+v.tx_lsyz_id+" data-fatherid="+v.tx_father_id+" data-zxsj="+(v.tx_lsyz_zxsj==null?"":v.tx_lsyz_zxsj)+"><td><div class='tx_common_field'></div></td> <td><div class='tx_common_field'></div></td>"
			   +"<td><div class='tx_common_field'>"+(v.tx_lsyz_yzcontent==null?"":v.tx_lsyz_yzcontent)+"</div></td><td><div class='tx_common_field'></div></td>"
			   +"<td><div class='tx_common_field'></div></td> <td><div class='tx_common_field'></div></td>"
			   +"</tr>"       
            );
          }
        });
        if(data.res.length<5){
           for(var i=0;i<5-data.res.length;i++){
             $("#tx_lsyz_table_thbody").append(
               "<tr><td><div class='tx_common_field'>&nbsp;</div></td> <td><div class='tx_common_field'></div></td> <td><div class='tx_common_field'></div></td></td>"
               +"<td><div class='tx_common_field'></div></td> <td><div class='tx_common_field'></div></td> <td><div class='tx_common_field'></div></tr>"
             );
           }
        }
      });
   }
   
   //添加医嘱
   var addhzyzpage=null;
   function addhzyz(){
      if('${userinfo.USER_PERMISSION}'=='3'||'${userinfo.USER_PERMISSION}'=='4'){
          layer.msg("当前用户没有权限操作医嘱！");
          return false;
      } 
      var tx_number=$("#tx_number").val();
      var tx_pb_date=$("input[name='tx_first_date']").val();
          addhzyzpage=layer.open({
			title : "临时医嘱",
			type : 2,
			skin : 'layui-layer-txform',
			area : [ "500px", "95%" ],
			closeBtn : 0,
			content :'user/txform_hzlsyz_detail.shtml?tx_number='+tx_number+'&tx_time='+tx_pb_date
       }); 
   }
    
    //添加医嘱模板组
	var yztemplatepage="";
	function addtemyz(){
	    if('${userinfo.USER_PERMISSION}'=='3'||'${userinfo.USER_PERMISSION}'=='4'){
          layer.msg("当前用户没有权限操作医嘱！");
          return false;
        } 
	    var tx_number = $("#tx_number").val();
	    var tx_name= $("input[name='tx_hz_name']").val();
	    var tx_time=$("input[name='tx_first_date']").val();
	    yztemplatepage=layer.open({
			type: 2,
			title: "医嘱模板",
			skin : 'layui-layer-txform',
			area : [ '70%', '70%' ],
			closeBtn : 0,
			shadeClose: true,
			content:'user/yz_template.shtml?tx_number='+tx_number+'&tx_name='+tx_name+'&tx_time='+tx_time
		}); 
	}
   
    //绑定单击事件
   $("#tx_lsyz_table").on("click","tr",function(){
      var id=$(this).attr("data-id");
      if(typeof(id)=="undefined"||id==""){return false;} 
      $(this).addClass("dbtr_active").siblings().removeClass("dbtr_active");
   });
   
   //删除医嘱
   function delhzyz(){
     var id=$("#tx_lsyz_table").find("tr.dbtr_active").attr("data-id");
     if(typeof(id)=="undefined"||id==""){layer.msg("请先选中医嘱记录！");return false;}
     //判断权限
     if('${userinfo.USER_PERMISSION}'=='3'||'${userinfo.USER_PERMISSION}'=='4'||'${userinfo.USER_PERMISSION}'=='5'){
	      layer.msg("当前用户没有权限操作医嘱！");
	      return false;
     } 
     //已执行后管理员才能删除
     if('${userinfo.USER_PERMISSION}'=='1'||'${userinfo.USER_PERMISSION}'=='2'){
           var exeflag="";
           var fatherid=$("#tx_lsyz_table").find("tr.dbtr_active").attr("data-fatherid");
           if(typeof(fatherid)=="undefined"){
             exeflag=$("#tx_lsyz_table").find("tr.dbtr_active").attr("data-zxsj");//主医嘱
           }else{
             exeflag=$("#tx_lsyz_table").find("tr[data-id="+fatherid+"]").attr("data-zxsj");//子医嘱
           }
           if(exeflag!=""){
               layer.msg("当前医嘱已执行，不能删除！");
	           return false;
           }
	  } 
     layer.confirm("确认删除数据？",{btn:["确认","取消"]},
       function(e){
         $.ajax({
	      type:"post",
	      data:{"id":id},
	      url:"txform/delweblsyz_ByID.shtml",
	      dataType:"json",        
	      success:function(data,status){
	          layer.msg("删除成功！");
	          gethzyzlist();     
	       },error:function(){layer.msg("删除出错，请稍候再试！");}
	     }); 
      },function(e,index){
        layer.close(index);
      }); 
   }
   
   //执行医嘱
   var exehzyzpage=null;
   function exehzyz(){
      var id=$("#tx_lsyz_table").find("tr.dbtr_active").attr("data-id");
      if(typeof(id)=="undefined"||id==""){layer.msg("请先选中医嘱记录！");return false;}
      var fid=$("#tx_lsyz_table").find("tr.dbtr_active").attr("data-fatherid");
      if(typeof(fid)!="undefined"&&fid!=""){id=fid;}
      var tx_number=$("#tx_number").val();
      var tx_pb_date=$("input[name='tx_first_date']").val();
      exehzyzpage=layer.open({
			title : "执行医嘱",
			type : 2,
			skin : 'layui-layer-txform',
			area : [ "500px", "95%" ],
			closeBtn : 0,
			shadeClose: true,
			content :'user/txform_hzlsyz_exe.shtml?id='+id+'&tx_number='+tx_number+'&tx_time='+tx_pb_date
       }); 
   }
   
   //修改医嘱
   var updatehzyzpage=null;
   $("#tx_lsyz_table").on("dblclick","tr",function(){
       if("${param.tx_no}"!=""){return false;}
      if('${userinfo.USER_PERMISSION}'=='3'||'${userinfo.USER_PERMISSION}'=='4'){
          layer.msg("当前用户没有权限操作医嘱！");
          return false;
      }
      $(this).addClass("dbtr_active").siblings().removeClass("dbtr_active");
      //判断是否已执行
      var fid=$(this).attr("data-fatherid");
      if(typeof(fid)=="undefined"){
          //主医嘱
          var exeflag=$(this).find("td:nth-child(4)").text();
          if(exeflag!=""){layer.msg("所选医嘱已停止，不能修改！");return false;}
      }else{
          //子医嘱
          var exeflag=$("#tx_lsyz_table").find("tr[data-id="+fid+"]>td:nth-child(4)").text();
          if(exeflag!=""){layer.msg("所选医嘱已停止，不能修改！");return false;}
      }
      var id=$("#tx_lsyz_table").find("tr.dbtr_active").attr("data-id");
      if(typeof(id)=="undefined"||id==""){layer.msg("请先选中医嘱记录！");return false;}
      var fid=$("#tx_lsyz_table").find("tr.dbtr_active").attr("data-fatherid");
      if(typeof(fid)!="undefined"&&fid!=""){id=fid;}
      var tx_number=$("#tx_number").val();
      var tx_pb_date=$("input[name='tx_first_date']").val();
       updatehzyzpage=layer.open({
			title : "临时医嘱",
			type : 2,
			skin : 'layui-layer-txform',
			area : [ "500px", "95%" ],
			closeBtn : 0,
			shadeClose: true,
			content :'user/txform_hzlsyz_update.shtml?tx_number='+tx_number+'&tx_time='+tx_pb_date+'&id='+id
       }); 
   });
   
   //确认透后评估
   function confirmthpg(){
     var tx_status=$("input[name='tx_status']").val(); 
     if(tx_status<3&&getNowymdDate()){layer.msg("结束透析后才能确认！");return false;}
     var load_index=layer.load(2, {time: 5*1000});
     var tx_number=$("#tx_number").val();
     var rq=$("input[name='tx_first_date']").val();
     var form_data= $("#txh_pg_form").serializeArray();
     $.ajax({
         type:"post",
         data:form_data,
         url:"txform/mtxform_hzthpg_save.shtml",
         dataType:"json",
         beforeSend:function(){
             $("button.save_txform_thpg").attr("disabled","disabled");
         },
         success:function(data,status){
              $("#tx_content").load("user/SearchhzinfoBytxrq.shtml?tx_number="+tx_number+"&tx_txdate="+rq,function(response, status, xhr){
                   if (status=="error") {layer.msg("保存出错："+ xhr.status + " " + xhr.statusText)}else{
                      layer.msg("数据保存成功！");
                   }
               }); 
         },error:function(){
            layer.msg("保存数据出错！");
         },complete:function(){
            $("button.save_txform_thpg").removeAttr("disabled");
            layer.close(load_index);
         } 
      });     
   }
   
   //透后评估初始化
   function initthpg(){
    if("未确认"==$("#txh_pg_form").find("span.head_confirm_status").text()){
        //计算默认实际治疗时长
        
        //默认导管/内篓
        if(''=='${txcf.tx_xgtl_id}'){
          $("input[name='txh_nl_name']").val("正常");
          $("input[name='txh_dg_name']").val("/");
	    }
	    if('${txcf.tx_xgtl_id}'.indexOf("内瘘")>-1){
	       $("input[name='txh_nl_name']").val("正常");
	       $("input[name='txh_dg_name']").val("/");
	    }else{
	       $("input[name='txh_nl_name']").val("/");
	    }
	    if('${txcf.tx_xgtl_id}'.indexOf("导管")>-1){
	       $("input[name='txh_nl_name']").val("/");
	       $("input[name='txh_dg_name']").val("正常");
	    }else{
	       $("input[name='txh_dg_name']").val("/");
	    }
    }
    if(""!==$("#tx_zlxj_content").val()){$("#th_xj_muban").find("option[value='"+$("#tx_zlxj_content").val()+"']").attr("selected","selected");}
    if(""!==$("#tx_xiaojie_muban").val()){$("#tx_xiaojie_muban").find("option[value='"+$("#tx_zlxj_xj").val()+"']").attr("selected","selected");}
  }
   
  //计算体重减少
  function calc_txh_tzjs(){
    var txh_tz=$("input[name='txh_tz']").val();
    var tx_tqtz=$("input[name='tx_tqtz']").val();
    if(txh_tz.trim().length==0||tx_tqtz.trim().length==0){
        $("input[name=txh_tzjs]").val("");
    }
    else{
	    var t=floatObj.subtract(tx_tqtz,txh_tz);
	    $("input[name=txh_tzjs]").val(isNaN(t)?"不详":t);
    }
  }
  //透后称重方式
  function th_czfsChange(){
	   if("卧床"==$("#txh_czfs option:selected").text()){
		      $("#txh_tz").attr("readonly","readonly").val("卧床");
		      $("#txh_tzjs").attr("readonly","readonly").val("不详");
		}
		else if("拒测"==$("#txh_czfs option:selected").text()){
		      $("#txh_tz").attr("readonly","readonly").val("拒测");
		      $("#txh_tzjs").attr("readonly","readonly").val("不详");
		}
		else{
		     $("#txh_tz").val("").removeAttr("readonly");
		     $("#txh_tzjs").val("").removeAttr("readonly");
	   }
   }
 
   //确认治疗小结
   function confirmzlxj(){
     var load_index=layer.load(2, {time: 5*1000});
     var tx_number=$("#tx_number").val();
     var rq=$("input[name='tx_first_date']").val();
     var tx_fs=$("select[name='tx_zl_fs']").val();
     if("0"==tx_fs){
          if(""==$("input[name='tx_ccfs']").val()){$("input[name='tx_ccfs']").val("无");}
          if(""==$("input[name='tx_ccz']").val()){$("input[name='tx_ccz']").val("无");}
       }
     if("1"==tx_fs){
         $("input[name='tx_ccfs']").val("");
         $("input[name='tx_ccz']").val("");
     }
     //设置id
       $("input[name='tx_sj_nurse_id'][type='hidden']").val($("#tx_sj_nurse option:selected").attr("data-id"));
       $("input[name='tx_zl_nurse_id'][type='hidden']").val($("#tx_zl_nurse option:selected").attr("data-id"));
       $("input[name='tx_hd_nurse_id'][type='hidden']").val($("#tx_hd_nurse option:selected").attr("data-id"));
       $("input[name='tx_xj_nurse_id'][type='hidden']").val($("#tx_xj_nurse option:selected").attr("data-id"));
       $("input[name='tx_zl_doctor_id'][type='hidden']").val($("#tx_zl_doctor option:selected").attr("data-id"));
     var form_data= $("#tx_zxlj_form").serializeArray();
     $.ajax({
         type:"post",
         data:form_data,
         url:"txform/mtxform_hzzlxj_save.shtml",
         dataType:"json",
         async:false,
         beforeSend:function(){
             $("button.save_txform_zlxj").attr("disabled","disabled");
         },
         success:function(data,status){
             $("#tx_content").load("user/SearchhzinfoBytxrq.shtml?tx_number="+tx_number+"&tx_txdate="+rq,function(response, status, xhr){
                 if (status=="error") {layer.msg("保存出错："+ xhr.status + " " + xhr.statusText)}else{
                    layer.msg("数据保存成功！");
                 }
             }); 
         },error:function(){
            layer.msg("保存数据出错！");
         },complete:function(){
            $("button.save_txform_zlxj").removeAttr("disabled");
            layer.close(load_index);
         } 
      });
   }
   $("select[name='tx_zl_fs']").width($("#tx_zl_nurse").width())
   
   /* 增加穿刺位点开始  ===================================================  */
   
   function changetx_zl_fs(param) {
        $("select[name='tx_zl_fs']").find("option[value=" + param + "]").attr("selected", "selected");
        if ("0" == param) {
            $("tr.txfs-tr-cc").removeClass("hidden")
            $("span.cc_hy_label").text("穿刺");
            $("td.td_cc_fs,td.td_cc_z,td.tx_ccfx").removeClass("hidden");
            if ($("input[name='tx_ccfs']").val().indexOf("绳梯法") >= 0) {
                $("td.tx_ccwd").removeClass("hidden")
                $("td.tx_tlpic").addClass("hidden")
            } else {
                $("td.tx_tlpic").removeClass("hidden")
                $("td.tx_ccwd").addClass("hidden")
            }
        }
        if ("1" == param) {
            $("span.cc_hy_label").text("换药");
            $("td.td_cc_fs").addClass("hidden");
            $("input[name='tx_ccfs']").val("");
            $("input[name='tx_ccz']").val("");
            $("tr.txfs-tr-cc").addClass("hidden")
        }
    }

    // 判断穿刺方式是否包含绳梯法
    function switchCcfs() {
        if ($("#tx_ccfs").val().indexOf("绳梯法") >= 0) {
            $("td.tx_ccwd").removeClass("hidden")
            $("td.tx_tlpic").addClass("hidden")
        } else {
            $("td.tx_tlpic").removeClass("hidden")
            $("td.tx_ccwd").addClass("hidden")
        }
    }
    switchCcfs()

	// 选择穿刺方向
    $("#tx_zxlj_table").off("click.ccfx").on("click.ccfx", "#tx_ccfx", function () {
        var begintxpage = layer.open({
            title: "A端穿刺方向",
            type: 1,
            skin: 'layui-layer-txform',
            area: ["528px", "620px"],
            closeBtn: 1,
            shadeClose: true,
            content: $("#ccfx_template").html()
        });
        var text = $("#tx_ccfx").val();
        $("div.ccfs-tpl .btn").each(function (i, v) {
            var str = $(v).text();
            if (text.indexOf(str) >= 0) {
                $(v).addClass("btn_active")
            }
        })
    })
	
	// 保存选择的穿刺方向
    $("body").off("click.save-ccfx").on("click.save-ccfx", "#save-ccfx", function () {
        var str = $("div.ccfs-tpl button.btn_active").text();
        $("#tx_ccfx").val(str)
        $(".layui-layer-setwin .layui-layer-close").trigger("click")
    })
	
    // 选择穿刺方式
    $("#tx_zxlj_table").off("click.ccfs").on("click.ccfs", "#tx_ccfs", function () {
        var begintxpage = layer.open({
            title: "穿刺方式",
            type: 1,
            skin: 'layui-layer-txform',
            area: ["528px", "620px"],
            closeBtn: 1,
            shadeClose: true,
            content: $("#ccfs_template").html()
        });
        var text = $("#tx_ccfs").val();
        $("div.ccfs-tpl .btn").each(function (i, v) {
            var str = $(v).text();
            if (text.indexOf(str) >= 0) {
                $(v).addClass("btn_active")
            }
        })
    })

    // 弹框选择切换穿刺方式
    function selectmultiple(tag) {
        var selectValue = $(tag).text();
        if (selectValue == "无") {
            $(tag).toggleClass("btn_active").siblings().removeClass("btn_active")
        } else {
            $(".select-cc-0").removeClass("btn_active")
            $(tag).toggleClass("btn_active")
        }
    }

	function selectmultiple2(tag) {
         $(tag).toggleClass("btn_active").siblings().removeClass("btn_active")
    }
    // 保存选择的穿刺方式
    $("body").off("click.save-ccfs").on("click.save-ccfs", "#save-ccfs", function () {
        var str = '';
        $("div.ccfs-tpl button.btn_active").each(function (i, v) {
            var ccfs = $(v).text() + ",";
            str += ccfs
        })
        if (str) {
            str = str.substring(0, str.length - 1);
        }
        //console.log(str)
        $("#tx_ccfs").val(str)
        switchCcfs();
        $(".layui-layer-setwin .layui-layer-close").trigger("click")
    })

    // 选择穿刺针
    $("#tx_zxlj_table").off("click.ccz").on("click.ccz", "#tx_ccz", function () {
        var begintxpage = layer.open({
            title: "选择穿刺针",
            type: 1,
            skin: 'layui-layer-txform',
            area: ["528px", "620px"],
            closeBtn: 1,
            shadeClose: true,
            content: $("#ccz_template").html()
        });
        var text = $("#tx_ccz").val();
        $("div.ccfs-tpl .btn").each(function (i, v) {
            var str = $(v).text();
            if (text.indexOf(str) >= 0) {
                $(v).addClass("btn_active")
            }
        })
    })

    // 保存选择的穿刺针
    $("body").off("click.save-ccz").on("click.save-ccz", "#save-ccz", function () {
        var str = '';
        $("div.ccfs-tpl button.btn_active").each(function (i, v) {
            var ccz = $(v).text() + ",";
            str += ccz
        })
        if (str) {
            str = str.substring(0, str.length - 1);
        }
        $("#tx_ccz").val(str)
        $(".layui-layer-setwin .layui-layer-close").trigger("click")
    })

    // 查看通路图片
    var viewpic_page = null;
    $("body").off("click.viewpic").on("click.viewpic", "#tx_viewpic", function () {
        // 显示通路图片
        var tx_number = '${param.tx_number}';
        var user_id = '${user_id.substring(0, 4)}';
        var pic_view = $("#view-markpic-wrap");
        var src =
            'https://biangene.oss-cn-shenzhen.aliyuncs.com/xgtl/${user_id.substring(0, 4)}/${param.tx_number}.png?x-oss-process=image/resize,w_600,h_800/quality,Q_100&tag=' +
            parseInt(Math.random() * 1000);
        pic_view.find("img").attr("src", src);
        pic_view.find("img").attr("onerror",
            "this.src='https://biangene.oss-cn-shenzhen.aliyuncs.com/xgtl/1162/default.png?x-oss-process=image/resize,w_600,h_800/quality,Q_100&v=20180126';"
        )


        $.post("xgtl/listxgtlwdt.shtml", {
            "tx_number": tx_number
        }, function (res) {
            if (res.status.length == 0) {
                return
            }
            $("#point_mark_img_wrap1").find("div").remove()
            var mark_data = JSON.parse(res.status[0].tx_xgtl_text),
                mark_A = mark_data.A,
                mark_V = mark_data.V,
                mark_T = mark_data.T;
            if (mark_A.length === 0 && mark_V == 0 && mark_T === 0) {
                return
            }

            mark_A.map(function (i, v) {
                var tag_span_a1 =
                    '<span class="mark-line mark-line-a" style="transform: rotate(' + i.rotate +
                    'deg);" data-rotate="' + i.rotate + '"></span>';
                var num = parseInt(i.markNum);
                var markDom = '<div class="mtx-mark-tag mark-target-a mark-target-a' + num +
                    '" data-num=' + num +
                    ' style="position:absolute;left:' + i.left + 'px;top:' + i.top + 'px;">' +
                    num + tag_span_a1 + '</div>';
                //console.log(markDom)
                $(markDom).appendTo($("#point_mark_img_wrap1"));
            })

            mark_V.map(function (i, v) {
                //console.log(i)
                var tag_span = '<span class="mark-line mark-line-v" style="transform: rotate(' +
                    i.rotate +
                    'deg);" data-rotate="' + i.rotate + '"></span>';
                var num = parseInt(i.markNum);
                var markDom = '<div class="mtx-mark-tag mark-target-v mark-target-v' + num +
                    '" data-num=' + num +
                    ' style="position:absolute;left:' + i.left + 'px;top:' + i.top + 'px;">' +
                    num + tag_span + '</div>';
                $(markDom).appendTo($("#point_mark_img_wrap1"));
            })

            mark_T.map(function (i, v) {
                //console.log(i)
                var markDom = '<div class="add-mark-text-wrap" style="position:absolute;left:' +
                    i.left + '%;top:' + i.top + '%;width:' + i.w + '%;">' +
                    '<input type="text"  class="mark-text-ipt" value="' + i.text +
                    '" readonly="true" style="width:' + i.width + 'px;">' +
                    '<span class="mark-text-line" style="transform: rotate(' + i.rotate +
                    'deg);" data-rotate="' + i.rotate + '"></span>' +
                    '</div>'
                $(markDom).appendTo($("#point_mark_img_wrap1"));
            })

            var scale = $("#point_mark_img_wrap1").width() / 600 ; //PC端的宽度为600，计算缩放比例
            //console.log($("#tx_form").width(), $("#point_mark_img_wrap1").width())
            $("#point_mark_img_wrap1 .mtx-mark-tag").each(function (i, v) {
                var $that = $(this),
                    width = parseInt($that.width()) * scale,
                    height = parseInt($that.height()) * scale,
                    left = parseInt($that.position().left) * scale,
                    top = parseInt($that.position().top) * scale;
                $that.css({
                    "left": left + "px",
                    "top": top + "px",
                    "width": width + "px",
                    "height": height + "px",
                    "line-height": height + "px",
                    "border-radius": height / 2 + "px"
                })

                var $line = $that.find(".mark-line");
                $line.css({
                    "width": $line.width() * scale,
                    "transform": "rotate(" + $line.data("rotate") + "deg)"
                })
                if (scale < 0.72) {
                    $that.css({
                        "transform": "scale(1.2,1.2)"
                    })
                    $line.css({
                        "transform": "rotate(" + $line.data("rotate") +
                            "deg) scale(0.8333)"
                    })
                }
                if (scale > 1) {
                    $that.css({
                        "font-size": "24px"
                    })
                    $line.css({
                        "transform": "rotate(" + $line.data("rotate") + "deg)"
                    })
                }
            })

            $("#point_mark_img_wrap1 .add-mark-text-wrap").each(function (i, v) {
                //console.log(v)
                var $that = $(this),
                    width = parseInt($that.width()) * scale,
                    height = parseInt($that.height()) * scale;
                $that.css({
                    /* "width": width + "px", */
                    "height": height + "px"
                })

                var $line = $that.find(".mark-text-line");
                $line.css({
                    "width": $line.width() * scale,
                    "transform": "rotate(" + $line.data("rotate") + "deg)"
                })
            })
        })
        pic_view.css("display", "block");
        pic_view.on("touchstart", "div,img", function (e) {
            e.stopPropagation();
            //e.preventDefault(); //阻止触摸时页面的滚动，缩放
        })
        $("#markpicWarp2 .close-view-img_ ,.shadow").click(function () {
        	$("#view-markpic-wrap div.mtx-mark-tag , #view-markpic-wrap .add-mark-text-wrap").remove()
            pic_view.css("display", "none");
        })



    })

    // 选择及查看位点
    var xgtl_ccwd_page = null;
    var tx_number = '${param.tx_number}';
    var zlxj_to_wd_flag = "zlxj";
    var user_id = '${userinfo.USER_ID.substring(0, 4)}';
    $("body").off("click.marktlwdbj").on("click.marktlwdbj", "#selectMark_show", function () {
        xgtl_pic_page = layer.open({
            type: 2,
            title: "选择穿刺位点",
            closeBtn: 1,
            anim: 2,
            shadeClose: true,
            skin: 'layui-layer-txform',
            area: ["528px", "620px"],
            content: 'txform/mtxform_xgtlccwd.shtml?tx_number=${param.tx_number}'
        });
    });
   	 
   /* 增加穿刺位点结束=====================  */
   
   var printsjdpage=null;
   function printtxformsjd(){
       var tx_number = $("#tx_number").val();
	   var tx_name= $("input[name='tx_hz_name']").val();
	   var tx_time=$("input[name='tx_first_date']").val();
	   printsjdpage=layer.open({
			type: 2,
			title: "上机单打印",
			skin : 'layui-layer-txform',
			area : [ '0', '0' ],
			closeBtn : 0,
			shadeClose: true,
			content:'user/txformsjd.shtml?tx_number='+tx_number+'&tx_name='+tx_name+'&tx_time='+tx_time
		}); 
   }
   
   var txbatchpage=null;
   function txfrombatchprint(){
     txbatchpage=layer.open({
        type: 1,
		title: '批量打印',
		closeBtn: 0,
		anim: 2,
		shadeClose: true,
		skin:'layui-layer-txform',
		area: ['550px', '220px'],
		content: $('.txform_batch_print') 
      });
   }
   
   function txformbatch(){
     var tx_start_time=$("#txbatch_start_time").val();
     var tx_end_time=$("#txbatch_end_time").val();
     if(new Date(tx_start_time.replace(/-/g, "/")).getTime()>new Date(tx_end_time.replace(/-/g, "/")).getTime()){
          layer.msg("开始时间不能大于结束时间！");
          return false;
      }
     var basePath=$("base").attr("href");
     if(tx_start_time!=""&&tx_end_time!=""){
      $.ajax({
         type:"post",
         data:{tx_number:"${param.tx_number}",tx_start_time:tx_start_time,tx_end_time:tx_end_time},
         async: false ,
         url:basePath+"user/gethzperiodtxtimes.shtml",
         dataType:"json",
         success:function(data){
            if(data.res>0){
                window.open(basePath+"user/getperiodtxform.shtml?tx_number=${param.tx_number}&tx_start_time="+tx_start_time+"&tx_end_time="+tx_end_time);
            }else{layer.msg("当前时间段范围内患者未做过透析！");}
         }
      });
     }else{
       layer.msg("时间不能为空！");
     }
   }
   
   //透析单归档
   function tx_archiving(){
      var tx_number=$("#tx_number").val();
      var tx_time="${param.tx_txdate}";
	  var confirm_index=layer.confirm('归档完成后，只有管理员可以修改记录，确认归档?', {
	    btn: ['确定','取消'],title:'温馨提示',closeBtn: 0,anim: 2,shadeClose: true,skin:'layui-layer-mtxform'
		},function(){
		  $.post("${ctx}user/txform_txarchiving.shtml",{"tx_number":tx_number,"tx_time":tx_time},function(data,status){
		      changetx_status(tx_number,"已归档");
		      if("success"==status){
		          $("#txform_archving_btn").text("已审核归档").css({"background-color":"#AFB3B5","border-color":"#AFB3B5"});
	              layer.msg("归档成功！");
		      }else{ layer.msg("归档出错，请重试！");}
		  });
		}, function(){
		   layer.close(confirm_index);
	    });
   }
   
   //入科方式
   var tx_rkfspage=null;
   function gettxhzrkfs(){
        if(""=="${tx_status.tx_status}"||${tx_status.tx_status<2}){layer.msg("请先开始透析再保存入科方式！");return false;}
        var tx_number=$("#tx_number").val();
        var tx_time="${param.tx_txdate}";
        var tx_rkfs=$("#tx_rkfs").val();
        tx_rkfspage = layer.open({
			title : "入科方式",
			type : 2,
			skin : 'layui-layer-txform',
			closeBtn: 0,
			shadeClose: true,
			anim: 2,
			area : [ "400px", "300px" ],
			content :'txform/txform_rkfs.shtml?tx_number='+tx_number+'&tx_time='+tx_time+'&tx_rkfs='+tx_rkfs
    	});     
   }		      
   
   //修改患者当前透析单的住院号门诊号
   var hzhospidpage=null;
   function updatehzhospid(){
     if($("input[name=tx_ismenzhen]").is(":checked")){
        $("#tx_hzhosptype_select").find("option[value='1']").attr("selected","selected");
     }else{$("#tx_hzhosptype_select").find("option[value='0']").attr("selected","selected");}
     $("#tx_hzhospid_input").val($("#tx_hzhospid").val());
     hzhospidpage=layer.open({
        type: 1,
		title: '修改住院号/门诊号',
		closeBtn: 0,
		anim: 2,
		shadeClose: true,
		skin:'layui-layer-txform',
		area: ['400px', '300px'],
		content: $('.tx_update_hzhospid') 
     });
     $("button.tx_update_hzhospid_cancel").attr("onclick","layer.close("+hzhospidpage+");")
   }
   
   function updatehzhospid_confirm(){
        var tx_hzhospid=$("#tx_hzhospid_input").val();
        if(""==tx_hzhospid){layer.msg("住院号/门诊号不能为空！");return false;}
        $.ajax({
         type:"post",
         data:{tx_number:"${param.tx_number}",tx_time:"${param.tx_txdate}",hosptype:$("#tx_hzhosptype_select").val(),tx_hzhospid:tx_hzhospid},
         async: false ,
         url:"txform/updatehzhospid.shtml",
         dataType:"json",
         success:function(data){
            if(data.res>0){
              $("#tx_content").load("user/SearchhzinfoBytxrq.shtml?tx_number=${param.tx_number}&tx_txdate=${param.tx_txdate}",function(response, status, xhr){
                   if (status=="error") {layer.msg("修改出错："+ xhr.status + " " + xhr.statusText)}else{
                      layer.msg("修改成功！");
                   }
               }); 
            }else{
              layer.msg("修改出错！");
            }
         },complete:function(){
            layer.close(hzhospidpage);
         }
      });
   }
   
    
   //导到病程记录
   function dcdbcjl(){
 
     //透析小结
    var tx_qr=$("#tx_xiaojie_muban").val();
    var tx_sf1=$("#tx_sf1").val();
    var tx_txxj_zt=$("#txxj_pdzt").val();//透析小结是否已确认
    var tx_zlxj_xj1=$("#tx_zlxj_xj").val();//透析小结内容 
    var tx_zlys=$("#tx_zl_doctor").val();//治疗医生   
    var tx_number=$("#tx_number").val();//透析号
    var RECORDING_DATE=getNowDate();
    var txq_hz="";
    var tx_pgq_zt=$("#txpgqzt").val();//状态
    var tx_pg_tq=$("#tx_pg_tq").val();//t前
    var tx_pg_pq=$("#tx_pg_pq").val();//p前
    var tx_pg_hrq=$("#tx_pg_hrq").val();//r前
    var tx_pg_bpq1=$("#tx_pg_bpq1").val();//bp1前
    var tx_pg_bpq2=$("#tx_pg_bpq2").val();//bp2前  
   // var txq_xz=$("#txq_xz").text();//透析前 选择 
    var txq_xz=$("#txq_xz").val();
    if( tx_pgq_zt=="1" && tx_pg_tq!="" && tx_pg_pq!="" && tx_pg_hrq!="" && tx_pg_bpq1!="" && tx_pg_bpq2!=""&&(txq_xz=="0" ||txq_xz=="1")){
          txq_hz=tx_pg_tq+","+tx_pg_pq+","+tx_pg_hrq+","+tx_pg_bpq1+","+tx_pg_bpq2;
            
    };
    
    
    //透析后评估
    var txh_hz="";
    var tx_pgh_zt=$("#txpghzt").val();//状态
    var txh_T=$("#txh_T").val();//t前
    var txh_P=$("#txh_P").val();//p前
    var txh_r=$("#txh_R").val();//r前
    var txh_bp1=$("#txh_bp1").val();//bp1前
    var txh_bp2=$("#txh_bp2").val();//bp2前     
    var txh_xz=$("#txh_xz").val();//透析后选择 
   
     if(tx_pgh_zt=="1" && txh_T!="" && txh_P!="" && txh_r!="" && txh_bp1!="" && txh_bp2!=""&&(txh_xz=="0" ||txh_xz=="1")){
          txh_hz=txh_T+","+txh_P+","+txh_r+","+txh_bp1+","+txh_bp2;
            
    };
    
   var  tx_zlxj_xj="";
  
   if(tx_txxj_zt!="1"){
          layer.msg("治疗小结未确认，导出失败！");
   }else if(tx_qr!="" && tx_txxj_zt=="1"){
     layer.msg("透析小结内容未保存，导出失败！"); 
   }else if(tx_sf1=="0" && tx_txxj_zt=="1"){
     layer.msg("透析小结内容未保存，导出失败！"); 
   }  
    else if(tx_zlxj_xj1==null || tx_zlxj_xj1 ==""){
          layer.msg("透析小结为空，导出失败！");  
   }else if(tx_zlys==null || tx_zlys==""){
         layer.msg("治疗医生为空，导出失败！"); 
   }else{
      if(txq_hz=="" && txh_hz==""){
         var  tx_zlxj_xj=tx_zlxj_xj1;
      }else{
           tx_zlxj_xj=tx_zlxj_xj1+",-_"+txq_hz+",-_"+txh_hz;
        
      };
       
   $.ajax({
         type:"post",
         data:{tx_number:tx_number,
               RECORDING_DATE: RECORDING_DATE,
               BC_DOCTOR: tx_zlys,
               BC_NAME:"日常病程",
               BC_CONTENT:tx_zlxj_xj,     
               },
         url:"manage/savetxbcjl.shtml",
         dataType:"json",
         success:function(data){
           if(data.res=="1"){
              layer.msg("导出成功");
           }else{
              layer.msg("导出失败");
           };
         }
      });
  
  
   
   };
   };
   
   
     function getNowDate() {
	    var date = new Date();
	    var seperator1 = "-";
	    var seperator2 = ":";
	    var month = date.getMonth() + 1; if (month >= 1 && month <= 9) {month = "0" + month;}
	    var strDate = date.getDate(); if (strDate >= 0 && strDate <= 9){strDate = "0" + strDate;}
	    var h=date.getHours();if(h>=0&&h<10){ h="0"+h;}
	    var i=date.getMinutes();if(i >= 0 && i <= 9) { i = "0" + i;}
	    var s=date.getSeconds(); if(s >= 0 && s <= 9) {s="0"+s;}
	    var currentdate = date.getFullYear() + seperator1 + month
	            + seperator1 + strDate
	            + " " + h + seperator2 + i
	            + seperator2 + s;
	    return currentdate;
	};
	
	
   
  </script>
  <script type="text/template" id="ccfs_template">
	<div style="padding:40px 16px 10px 16px; height: 578px;" class="ccfs-tpl">
		<div class="modal_type_tittle" style="height:40px;line-height:40px;font-size:18px;">穿刺方式:</div>
		<div class="modal_content">
			<button type="button" id="select-ccfs-0" data-id="1" data-name="无" class="btn btn-default btn_common select-cc-0" onclick="selectmultiple(this)">无</button>
			<button type="button" id="select-ccfs-1" data-id="2" data-name="扣眼法" class="btn btn-default btn_common" onclick="selectmultiple(this)">扣眼法</button>
			<button type="button" id="select-ccfs-2" data-id="3" data-name="绳梯法" class="btn btn-default btn_common" onclick="selectmultiple(this)">绳梯法</button>
			<button type="button" id="select-ccfs-3" data-id="4" data-name="区域法" class="btn btn-default btn_common" onclick="selectmultiple(this)">区域法</button>
		</div>
		<div class="save-warp">
			<span id="save-ccfs">保存</span>
		</div>
	</div>
  </script>
  <script type="text/template" id="ccfx_template">
	<div style="padding:40px 16px 10px 16px; height: 578px;" class="ccfs-tpl">
		<div class="modal_type_tittle" style="height:40px;line-height:40px;font-size:18px;">A端穿刺方向:</div>
		<div class="modal_content">
			<button type="button" id="select-ccfx-1" data-id="2" data-name="向心" class="btn btn-default btn_common" onclick="selectmultiple2(this)">向心</button>
			<button type="button" id="select-ccfx-2" data-id="3" data-name="离心" class="btn btn-default btn_common" onclick="selectmultiple2(this)">离心</button>
		</div>
		<div class="save-warp">
			<span id="save-ccfx">保存</span>
		</div>
	</div>
  </script>
  <style>
		div.ccfs-tpl button{
			margin-right:12px;
			font-size:16px;
			outline:none;
			background:#fff;
		}
		div.ccfs-tpl button:focus,div.ccfs-tpl button:active{
			outline:none;
			background:#fff;
		}
		div.ccfs-tpl button.btn_active{
		    color: #3da2ee!important;
    		border: 1px solid #3da2ee !important;
			outline:0;
			background:#fff;
		}
		div.save-warp{
			position:absolute;
			width:100%;
			right:0;
			top:4px;
			text-align:right;
			border-bottom: 1px solid #eee !important;
		}
		div.save-warp span{
			display:inline-block;
			padding:4px 20px;
			text-align:right;
			font-size: 18px;
    		color: #3da2ee;
			position:relative;
			left:-16px;
			cursor: pointer;
    		font-family: 微软雅黑;
		}
	</style>
  <script type="text/template" id="ccz_template">
	<div style="padding:40px 16px 10px 16px; height: 578px;" class="ccfs-tpl">
		<div class="modal_type_tittle" style="height:40px;line-height:40px;font-size:18px;">穿刺针:</div>
		<div class="modal_content">
			<button type="button" id="tx-ccz-0" data-id="1" data-name="无" class="btn btn-default btn_common select-cc-0" onclick="selectmultiple(this)">无</button>
    		<button type="button" id="tx-ccz-1" data-id="2" data-name="V钝针" class="btn btn-default btn_common" onclick="selectmultiple(this)">V钝针</button>
    		<button type="button" id="tx-ccz-2" data-id="3" data-name="V锐针" class="btn btn-default btn_common" onclick="selectmultiple(this)">V锐针</button>
    		<button type="button" id="tx-ccz-3" data-id="4" data-name="A锐针" class="btn btn-default btn_common" onclick="selectmultiple(this)">A锐针</button>
    		<button type="button" id="tx-ccz-4" data-id="5" data-name="A钝针" class="btn btn-default btn_common" onclick="selectmultiple(this)">A钝针</button>
		</div>
		<div class="save-warp">
			<span id="save-ccz">保存</span>
		</div>
	</div>
  </script>
  <script type="text/template" id="xgtlwdpic_template">
	<div id="view-markpic-wrap" style="display:block;padding:20px;overflow-y:scroll;">
        <div id="markpicWarp2" style="position:relative;padding: 4px;background-color: #fff;border: 1px solid #ddd;border-radius: 2px;">
        	<div id="point_mark_img_wrap1" style="width:100%;padding:0;border:0;"><img src="" alt="血管通路图片"></div>
        </div>
    </div>
  </script>
</html>
